Question : How to write and use classes in VB.net

I have been using VB.net for some time now (I am also familiar with C#), but never created and programmed using classes.

Most books give a chapter on Objects and classed and then tell you that the subject can occupy a full book. Yet I never found that book.

I was wondering if I could find a couple of example small applications that use classes and objects so that I could see how they are designed and implemented.

Does any body know of tutorial examples?

Thanks.

Answer : How to write and use classes in VB.net

Here's is a simple example:




1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
'here is the class
Public Class Employee
	Public Property Name() As String
		Get
			Return m_Name
		End Get
		Set
			m_Name = Value
		End Set
	End Property
	Private m_Name As String
	Public Property DateOfBirth() As DateTime
		Get
			Return m_DateOfBirth
		End Get
		Set
			m_DateOfBirth = Value
		End Set
	End Property
	Private m_DateOfBirth As DateTime
End Class

'and this class can be initialized as below
Dim employee As New Employee()
employee.Name = "Bill Gates"
employee.DateOfBirth = "10/28/1955"
Random Solutions  
 
programming4us programming4us