Wakane Posted November 13, 2002 Posted November 13, 2002 In java there's this thing, for example : public class JavaClass1 { static { System.out.println("This function is called once, when the class is loaded in memory"); } } Does VB.net has got an equivalent "static {...}" like the above example java class? Thank you Quote
*Gurus* divil Posted November 13, 2002 *Gurus* Posted November 13, 2002 I don't know java, but there is nothing that is called when the class is loaded in to memory. You can use the constructor for when the class is instantiated. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
Wakane Posted November 13, 2002 Author Posted November 13, 2002 I don't know java, but there is nothing that is called when the class is loaded in to memory. You can use the constructor for when the class is instantiated. Actually that's not what I meant, but thanks! I found an alternative way (a little bit inefficient, but it works) to give the same result. Thanks Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.