What's the Defference????

hayto

Member
Joined
Aug 31, 2004
Messages
13
Programming Experience
Beginner
'class1
public FirstName as string

public sub new(firstname as string)
me.FirstName=firstname
end sub
---------------------------------------
'Click event of form
Dim Myclass as new Class1
Myclass.FirstName = "haitham" "Case1"

or :
Dim Myclass as new Class1("haitham") "Case2"
---------------------------------------
So what's the deference between 2 cases??
 
Top Bottom