Simple Class Program
Aim:
To find the Simple class program using visual basic .net console application
Coding:
Public Class str1
Dim name As String
Dim rno As Integer
Dim tmark As Integer
Dim tam, mat, eng As Integer
Function input() As Integer
Console.WriteLine("enter the name rollno ")
name = Console.ReadLine
rno = Console.ReadLine
Console.WriteLine("enter the 3 marks")
tam = Console.ReadLine
mat = Console.ReadLine
eng = Console.ReadLine
Return (0)
End Function
Function output() As Integer
tmark = tam + eng + mat
Console.WriteLine("name={0}", name)
Console.WriteLine("rollno={0}", rno)
Console.WriteLine("tmark={0}", tmark)
Return (0)
End Function
End Class
Module Module1
Sub Main()
Dim s As New str1()
s.input()
s.output()
Console.ReadLine()
End Sub
End Module
Output: