- Back to Home »
- VB.NET »
- VB.NET Class and Object
Posted by :
Sudhir Chekuri
Saturday, 5 October 2013
VB.NET Class and Object
Class is a blueprint.
Object is an instance of a class
All the methods, variables and properties inside class are known as members of class.
Members of class can be accessed outside by creating the object for that class.
VB.NET class and object program
Module Module1
Public Class class1
Public Sub print()
Console.WriteLine("Hello world")
End Sub
End Class
Sub Main()
Dim o As New class1()
o.print()
Console.ReadLine()
End Sub
End Module
Output
Hello world
Explanation