Skip to content

Instantly share code, notes, and snippets.

@AlexLaforge
Forked from mlhaufe/parameters.vbs
Created February 24, 2020 21:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AlexLaforge/6c2731bdc64184595d8a9cc50429e8eb to your computer and use it in GitHub Desktop.
Save AlexLaforge/6c2731bdc64184595d8a9cc50429e8eb to your computer and use it in GitHub Desktop.
VBScript class constructor parameters
Class Person
Private m_Age
Private m_Name
Public Default Function Init(Name, Age)
m_Name = Name
m_Age = Age
Set Init = Me
End Function
Public Property Get Name
Name = m_Name
End Property
Public Property Let Name(v)
m_Name = v
End Property
Public Property Get Age
Age = m_Age
End Property
Public Property Let Age(v)
m_Age = v
End Property
End Class
Dim TheDude : Set TheDude = (New Person)("John",40)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment