Objects in VB.NET
What are Objects in VB.NET?
ObjectsObjects in VB.net
are instances of a class. Advantage of objects is that it can be used flexibly by referring the class name without the need to write code.
Every object that has its own Properties, Methods and Events. Properties of the object define the
characteristics, the Methods define the procedure that can operate on a Object. The events are possible actions
that can occur to an object
Dim obj As New Subtr
Public Class Subtr
Dim a As Integer = 100
Dim b As Integer = 10
Console.WriteLine("Subtraction of 100-10::" & a - b)
Subtraction of 100-10::90
In the above example,obj
is an instance of the class Subtr
.Using this object the function
is used without writing any code.