Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
With...EndWith in C#?
Message
From
06/04/2002 11:04:17
 
 
To
06/04/2002 02:13:57
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00641741
Message ID:
00641806
Views:
13
>Hi!
>
>Please, do we have in C# some structure like VFP´s WITH...ENDWITH?
>
>Please, tell we DO have. :)

DISCLAIMER: I am very new to C# so the below could be totally wrong. :)

I haven't seen one yet, but have you tried the "using" command? Any classes that you specify with a using will allow you to reference its members without specifying the namespace and class.

So, if you write a class named MyClass in a namespace called MyUtils then when you are writting code to use one of those classes members you have to write:
MyUtils.MyClass.MyMethod( param1 );
Or, if you put a using in your namespace and I think you can put the using at the .cs level, the namespace level, or the class level (block) then it applies to that whole block...
using MyUtils.MyClass;


// lots of code here

MyMethod( param1 );
BOb
Previous
Reply
Map
View

Click here to load this message in the networking platform