Syntax Example: Class Cyborg
Private FCyborgName
Public Property Get CyborgName()
CyborgName = FCyborgName
End Property
Public Property Let CyborgName(pCyborgName)
FCyborgName = pCyborgName
End Property
End Class
Complete Example
The following is a complete example of the class above.
<%@LANGUAGE=VBScript%>
<%Option Explicit%>
<html>
<head><title>Test Page</title></head>
<body>
<h1>Introduce Yourself</h1>
<%
Dim Cameron
Set Cameron = new Cyborg
Cameron.CyborgName = "Cameron"
Cameron.IntroduceYourself()
%>
</body>
</html>
<%
Class Cyborg
Private FCyborgName
Public Property Get CyborgName()
CyborgName = FCyborgName
End Property
Public Property Let CyborgName(pCyborgName)
FCyborgName = pCyborgName
End Property
Public Function IntroduceYourself()
Response.Write("Hello, my name is " & CyborgName & ", it's nice to meet you!")
End Function
End Class
%>