im learing vb.net and I don't understand so good how to make a class.
I new that a class have properties and constructors and functions.
Example think of a person
A person get a First name and a family name
aren't that not the properties ?
Why is the in de code set to private and not public
And how can we acces a private property
Why do we use the constructor new.
I new that a class have properties and constructors and functions.
Example think of a person
A person get a First name and a family name
aren't that not the properties ?
Why is the in de code set to private and not public
And how can we acces a private property
Why do we use the constructor new.
vb.net Code:
Class Person Private _Name As String ' (1) Public Property Name() As String Get Name = _Name ' (2) End Get Set(ByVal value As String) _Name = value ' (3) End Set End Property End Class