Page 92 - Programming VB.NET
P. 92

88                                       Chapter 9: OOP



                   Public Class Student

                       Private strname As String
                       Private strregnum As String

                       Private intmark As Integer



                       Public Sub New()

                           strname = String.Empty

                           strregnum = String.Empty

                           intmark = 0
                       End Sub

                   Public Property name() As String

                           Get

                               Return strname

                           End Get

                           Set(ByVal value As String)

                               strname = value
                           End Set

                       End Property
   87   88   89   90   91   92   93   94   95   96   97