Public Class Class1 Dim a, b As Integer Sub New() Console.Write("Enter 1st number : ") a = CInt(Console.ReadLine()) Console.Write("Enter 2nd number : ") b = CInt(Console.ReadLine()) End Sub Sub add() Dim c As Integer c = a + b Console.WriteLine() Console.WriteLine("Sum = " + c.ToString()) End Sub End Class Module SumUsingClass Sub Main() Dim obj As New Class1 obj.add() Console.ReadLine() End Sub End Module
Visual Basic dot net VB.net programming microsoft .net framework object oriented language network enabled technology visual basic 2005 IDE integrated development environment console application microsoft cre common runtime environment
Find Sum using Class
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment