Difference between Private, public etc

Conqu3st

New member
Joined
Apr 3, 2007
Messages
4
Programming Experience
Beginner
Noob questions, but to the point:

Whats the actual diffference, from a coders standpoint between:

VB.NET:
    [B]Private[/B] Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click

End Sub

VB.NET:
    [B]Public [/B]Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click

End Sub

thanks for any help clarifying this up for me :D
 
private can be 'seen' from within the form or module that its written. Public can be 'seen' by other forms or modules.

By 'seen' i mean that it can be called or referenced within code.
 
Friend is a better scope to use than Public in my opinion, although there are times when you need to use Public still
 
Back
Top