Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Module VBModule
Public Class Employee
Dim name As String
Dim age As Integer
Public Sub New(ByVal n As String,ByVal a As Integer)
name=n
age=a
End Sub
Public Sub Display()
Console.WriteLine("Name="& name & Space(2) &"Age="& age)
Console.ReadLine()
End Sub
End Class
Sub Main()
Dim ob1 As Employee=New Employee("Rajat",20)
ob1.Display()
End Sub
End Module
Advertisements
We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.
AcceptLearn more