OOP Class 2 Example
OOP Class 2 Example
Imports System
Imports System.Collections.Generic
Imports System.Linq
Imports System.Text
Namespace Program10
Class Employee
Public code As Integer
Public name As String
Public designation As String
End Class
Class Program
Private Shared Sub Main(ByVal args As String())
Dim emp As Employee = New Employee()
Console.WriteLine("Enter Employee Code")
emp.code = Integer.Parse(Console.ReadLine())
Console.WriteLine("Enter name and designation")
emp.name = Console.ReadLine()
emp.designation = Console.ReadLine()
Console.WriteLine("Code= " & emp.code)
Console.WriteLine("Name= " & emp.name)
Console.WriteLine("Designation= " & emp.designation)
End Sub
End Class
End Namespace
©Copyright 2016 All Rights Reserved LearnDotNetHome.com