In c# this seems to work fine but in VBS it chucks errors,
can anyone explain why and how to correct please.
Class MyClass
Private tall
Private fat
Private Sub Class_Initialize
tall = 100
fat = 100
End Sub
Public Property Get Height
Height = tall
End Property
Public Property Get Weight
Weight = fat
End Property
Public Property Set Height( temp )
If Not IsNumeric( temp ) Then
tall = CInt( temp )
Else
tall = temp
End If
End Property
Public Property Set Weight( temp )
If Not IsNumeric( temp ) Then
fat = CInt( temp )
Else
fat = temp
End If
End Property
End Class
Set test = new MyClass
test.Height = 190
WScript.Echo "Test's Height is: " & test.Height & vbCrlf &_
"Test's Weight is: " & test.Weight