|
As far as I know Java have this. And it could be beatiful to goto label2 directly for example. Not only a break to one outer loop.
Sarp Arda Coskun
|
|
|
|
|
You could still use goto , but remember:
For every goto you use, god kills a kitten!
mav
|
|
|
|
|
For god's shake...i haven't used goto since :
Amstrad 6-128
BASIC 1.1
Ready
|
Aaaaahh beautiful recollections of my childhood.
|
|
|
|
|
Perl does it and it makes sense to me. *shrug*
---
Shawn Poulson
spoulson@explodingcoder.com
|
|
|
|
|
C# is a post C++ and Java language, It took the good from both languages. using labels in code makes it unreadable, using labels is not a good idea. Thats y they got rid of so called labels.
Work smarter, not harder
-- modified at 16:55 Thursday 8th December, 2005
|
|
|
|
|
C# has labels and goto statements but not allow labels with break statements.
However, I also agree on that it decreases the readibility of the code.
|
|
|
|
|
Man, what you're asking for is damn ugly. If Java has this, I'm glad I don't use Java.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Huh, this is the first time that I see the word ugly on a statement, thanks for you comment friend
Sarp Arda Coskun
|
|
|
|
|
Hi
When a MDIChild menu is merged with the MDIParent menu via combination of MatchOnly and Insert MergeAction , actually the ToolStripMenuItems are removed from the MDIChild menu and are inserted in the MDIParent menu.So after merge is complete i can't enumerate the ToolStripMenuItems of the MDIChild menu because they don't exist there anymore.Does this accomplished via shallow copy or deep copy ? If i keep an array of these elements before Merge takes place will this collection substitutes the enumeration ? If not is there any way to deal with these items as a collection (stricty as a collection because i can access them individually ) after merging (inside the MDIChild of course) ?
Thanx in advance.
P.S Working on VS2005 beta 2
|
|
|
|
|
A List<ToolStripItem> works fine.
|
|
|
|
|
hi,
by default the configuration file should be located where the 'exe' file is and the name should end with '[applicationname].config'
how can i specify if the location of the config file is somewhere else?
regards,
rnv
|
|
|
|
|
|
Hi all !
I search the way to capture events on my shared folders.Like the mmc Shared folders.
I'm interesting by session connection/disconnection events or open file events...
If somebody can help me ...
Thanks in advance
PS : Sorry for my bad english
|
|
|
|
|
I'm trying to set things up so that multiple users can access a shared file, but only the first to open the file can get write privlages (the remainder are limited to readonly access).
I'm trying to use the FileSHare property to do this without success. What I tried doing was having the
app first try to open it with FileAccess.ReadWrite and FileShare.Read privlages, and if that failed in with FileAccess.Read FileShare.Read for read only acccess.
What I've discovered is that if the first user has the file open, the 2nd+ users fail due to a permissions failure. I don't understand why though, the first user's allowing readshare privs, and the 2nd is only attempting to open it for read access.
|
|
|
|
|
Good morning!
Have a try with this code. Run it simultaneously on a file whose path you set in the variable path .
string path = @"C:\A\Path\To\A\File\moo.txt";
System.IO.FileStream fs = null;
Exception me = null;
try
{
fs = new System.IO.FileStream( path,
System.IO.FileMode.Open,
System.IO.FileAccess.ReadWrite,
System.IO.FileShare.Read );
}
catch( Exception )
{
try
{
fs = System.IO.File.Open( path,
System.IO.FileMode.Open,
System.IO.FileAccess.Read,
System.IO.FileShare.ReadWrite );
}
catch( Exception e )
{
me = e;
}
}
finally
{
if( me != null )
{
Console.WriteLine( "Error: " + me.Message );
System.Threading.Thread.Sleep( 10000 );
}
else
{
Console.WriteLine( "Read: " + fs.CanRead + Environment.NewLine +
"Write: " + fs.CanWrite );
System.Threading.Thread.Sleep( 10000 );
fs.Close();
}
}
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
-- modified at 11:34 Thursday 8th December, 2005
|
|
|
|
|
|
I truly hope that it helps.
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
i need a help using crystal.net with c#.net
here is my problem: i want to use TOP N propriety in code on c#.net, but i just know how to do it on crystal, can anybody help me ?
tks
|
|
|
|
|
horacyjr wrote: i want to use TOP N propriety in code on c#.net, but i just know how to do it on crystal, can anybody help me ?
TOP N? In C#? I think you are getting confused with SQL.
In SQL you can do something like this:
SELECT TOP 10 * FROM MyTable
If this is not what you are looking for please clarify your request.
My: Blog | Photos
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucious
|
|
|
|
|
In Sql server, you can specify "N" dynamically but you have to use dynamic query.
|
|
|
|
|
Only for SQL Server 2000. In SQL Server 2005 you can specify N with a variable.
SELECT TOP @numRows * FROM MyTable
My: Blog | Photos
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucious
|
|
|
|
|
|
|
this was the answwer , thanks for helping
http://msdn.microsoft.com/library/default.asp?url=/library/en-s/crystlrf/html/crlrftopbottomnsortfieldclasstopic.asp
private TopBottomNSortField GetTopBottomNSortField
(int sortFieldIndex)
{
TopBottomNSortField topBottomNSortField;
// Get the SortField object by index, cast it as a
// TopBottomNSortField object, and return it.
topBottomNSortField =
Report.DataDefinition.SortFields[sortFieldIndex]
as TopBottomNSortField;
if (topBottomNSortField != null) return topBottomNSortField;
else return null;
}
|
|
|
|
|
Hello. I want to do something like this:
float number = 3 / 2;
The problem is that the decimals don't show up, all that is displayed is "1" instead of 1.5. I have tried using float/double/decimal but still the decimals disappear.
What's wrong? Am I missing something here?
|
|
|
|