this causes a ClassCastException:
ArrayList al = new ArrayList();
al.add(new String("Adam"));
al.add(new String("Bob"));
al.add(new String("Carl"));
String sl[] = (String [])al.toArray();
does anyone know how to make this cast work?
| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | VB Forums | Developer.com |
|
Results 1 to 2 of 2
Thread: problem casting CollectionThreaded View
|
Click Here to Expand Forum to Full Width |