Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Major mixup in two ASP.NET transactions
Message
From
04/09/2006 14:40:00
 
 
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
VB 8.0
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01150471
Message ID:
01150767
Views:
39
>Not quite. The sample I gave used the constructor (New() in VB if IRRC). Ordinary methods aren't quite the same. Defining ordinary methods as static means they can be called without instantiating the actual object: So given:
>public class Framework
>{
>      public static string SayHello()
>      {
>        return "Hello";
>      }
>}
>This method could be used like:
>string s = Framework.SayHello();
>// Rather than:
>f = new Framework();
>string s = f.SayHello();
>// In fact this wouldn't be legal....
>
>Lots of native examples of this behaviour in the .NET framework; Guid.NewGuid() is a classic example....

Thanks, I will have to see if I can switch Initialize() to a New() approach. If yes, then I would have something interesting here.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform