How can I add an arraylist attribute into a class using classic ASP?
My Example (Not working):
Class AA
Public AA_id
Dim data: set data = CreateObject("System.Collections.ArrayList")
End Class
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You need to initialize class members inside a method – function, sub routine of the class constructor. Naturally, the best of these is inside the constructor.
Fully working code demonstrating how to use the .NET ArrayList as part of custom VBScript class:
Usage sample, including adding a complex object: