I would like to now how the ASP Classic/VB6 FOR EACH loop works. I know with .NET IEnumberable/IEnumerator are involved, but how does VB6/ASP Classic do it?
Thanks!
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.
It does it in a very similar way. A class that supports foreach has a method that has the DispID of -4 which returns an enumerator object similar to an implementation of IEnumerator.
If you intend to implement this in VB6 then whilst it is possible you will have to be prepared to jump through prohibitively complicated hoops, especially since such insanely complicated stuff is now well past its sell by date. The COM equivalent to IEnumerator is
stole.IEnumVARIANT, one characteristic that makes it incompatible with a simple implementation in VB6 is that itsNextmethod usesS_FALSEHResult.If you really, really want to do this then get this book: Advanced Visual Basic 6 if you can. Warning from a typical VB6 developers point of view the term “Advanced” doesn’t really do it justice. “Insanely deep VB6” would be a better description.