Write a Console Application to initialize Person Class using a Constructors


Module Module1

    Public Class Initailize_Constuctor
        Public Sub New(ByVal name As String, ByVal address As String)
            Console.WriteLine("Name of Employee is :" & name)
            Console.WriteLine("Address of Employee is :" & address)
            Console.WriteLine(" ")
        End Sub
    End Class


    Public Sub Main()
        Dim name, address As String
        Console.WriteLine("Enter name of Employee:")
        name = Console.ReadLine()
        Console.WriteLine("Enter address of Employee:")
        address = Console.ReadLine()
        Console.WriteLine(" ")
        Console.WriteLine(" ")
        Dim emp_obj As New Initailize_Constuctor(name, address)
        Console.ReadLine()
    End Sub

End Module

Read more...
Related Posts Plugin for WordPress, Blogger...

Engineering material

GTU IDP/ UDP PROJECT

GTU IDP/ UDP PROJECT

Patel free software download

  © Blogger templates The Professional Template by Ourblogtemplates.com 2008

Back to TOP