L
Learner
Hello,
I just wanted to jump on try creating a small calss in VB.NET in a
note pad. And my class takes below lines of code
Public Class Product
Public Name as string
Private m_id as string
Public Sub New()
m_id = 0
End Sub
Public property ID() as Integer
Get
ID = M_id
End Get
Set(byVal Value as Integer)
m_id = Value
End Set
End Property
End Class
But when I run this in the command prompt I got the above error that is
mentioned in the subject line.
Now, my question is do I need to have Sub Main class to create a simple
class? I guess may be I need it when I want create an object for this
Product class and try calling its properties and methods.
Please help me understand.
Thanks
-L
I just wanted to jump on try creating a small calss in VB.NET in a
note pad. And my class takes below lines of code
Public Class Product
Public Name as string
Private m_id as string
Public Sub New()
m_id = 0
End Sub
Public property ID() as Integer
Get
ID = M_id
End Get
Set(byVal Value as Integer)
m_id = Value
End Set
End Property
End Class
But when I run this in the command prompt I got the above error that is
mentioned in the subject line.
Now, my question is do I need to have Sub Main class to create a simple
class? I guess may be I need it when I want create an object for this
Product class and try calling its properties and methods.
Please help me understand.
Thanks
-L