Class Employee
Public name As String
Private salary As Double
End Class
Module MDLTest
Sub Main()
Dim c As New Employee
c.name = "John"
' Error:
' c.salary = 100403.33
End Sub
End Module
---------------------------------------------------------------
Class Client
Public prefix As String
Public name As String
Public Shared printPrefix As Boolean = True
Sub PrintName()
If printPrefix Then Console.Write(prefix)
Console.WriteLine(name)
End Sub
End Class
Module MDLTest
Sub Main()
Dim x As New Client
x.prefix = "Mr."
x.name = "John Smith"
Client.printPrefix = False
x.PrintName()
End Sub
End Module