Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

IEnumerator

Posted on 2007-11-18
4
Medium Priority
?
442 Views
Last Modified: 2010-04-24
Could anyone tell me which is the correct form in VC++?

System::Collections::IEnumerator^ myEnumerator = groupBox2->Controls->GetEnumerator();

while ( myEnumerator->MoveNext()){
    CheckBox test =(CheckBox)myEnumerator->Current;
}
0
Comment
Question by:aureliuh
2 Comments
 
LVL 55

Accepted Solution

by:
Jaime Olivares earned 1000 total points
ID: 20308144
System::Collections::IEnumerator* myEnumerator = groupBox2->Controls-->GetEnumerator();
while (myEnumerator->MoveNext())
{
    CheckBox *test = __try_cast<CheckBox *>(myEnumerator->Current);
}
0
 
LVL 1

Expert Comment

by:Computer101
ID: 20520479
Forced accept.

Computer101
EE Admin
0

Featured Post

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

879 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question