answersLogoWhite

0

What is private in vbnet?

User Avatar

Anonymous

13y ago
Updated: 8/19/2019

The 'private' keyword in vb.net is commonly used in variable declaration or sometimes in creating functions. This means that when a variable or function is created privately (eg private variable1 as integer), the class that contains that variable/function will be the only class that will have access to it. Here's an example:

class form1

Private variable1 As Integer=5

end class

_______________________

class form2

end class

form2 will not be able to access form1's variable1 because it is declared as Private. To make form1's variable1 usable to form2 it should be declared as Public variable1 As Integer=5.

I hope i've given you a clear explanation. Good luck on your programming mate!

User Avatar

Wiki User

13y ago

What else can I help you with?