Click here to Skip to main content
15,909,091 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi,

How to use static variable in vb.net

in C# i can do like this "public static TextBox txtBox;"...how can i achieve this in vb.net...

Thanks...

Arasu
Posted

VB
Dim Public Shared txtBox As TextBox
 
Share this answer
 
Comments
Keith Barrow 6-Dec-11 3:16am    
I didn't know you were a VB expert :P
At the level of the Class/Module use Shared instead, inside a method/procure use Static.

At the application use c# instead :)
 
Share this answer
 
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900