FlyBoy Posted September 19, 2004 Posted September 19, 2004 i have this: Public Class Customer Private _ID As Integer Public Sub New(ByVal id As Integer) Me.ID = id End Sub Public Property ID() As Integer Get Return Me._ID End Get Set(ByVal Value As Integer) Me._ID = Value End Set End Property my question is,what the sub new is for? its not a property or a method,so basically what it does??? (is it a built in something like "sub main" in modules?) Quote
Administrators PlausiblyDamp Posted September 19, 2004 Administrators Posted September 19, 2004 The Sub New is what is refered to as a constructor, it allows you to pass in information to a class at the point of instantiation. You may find this useful. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
FlyBoy Posted September 19, 2004 Author Posted September 19, 2004 The Sub New is what is refered to as a constructor, it allows you to pass in information to a class at the point of instantiation. You may find this useful. got that! thanks!!!! :cool: ;) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.