D
Dirk
Hello
The following code does not work
ArrayList __gc* allControls = new ArrayList();
.....
// put some Controls in allControls
....
Control __gc* arr[] = dynamic_cast<Control
__gc*[]>(allControls->ToArray(__typeof(Control)));
The cast does not succeed and arr is NULL. This is a translated version of
some C# code I saw. So I think it is supposed to work. If I use allControls
directly and iterate through the array casting each item to Control __gc* it
also works. So the items in allControl are really of type Control __gc*.
Thanks
The following code does not work
ArrayList __gc* allControls = new ArrayList();
.....
// put some Controls in allControls
....
Control __gc* arr[] = dynamic_cast<Control
__gc*[]>(allControls->ToArray(__typeof(Control)));
The cast does not succeed and arr is NULL. This is a translated version of
some C# code I saw. So I think it is supposed to work. If I use allControls
directly and iterate through the array casting each item to Control __gc* it
also works. So the items in allControl are really of type Control __gc*.
Thanks