Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

Posted
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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...