In my Windows 8 app written using Visual Studio 11 Express Beta, I cannot use the ArrayList. Here is my code:
using System.Collections;
ArrayList al = new ArrayList();
Compiler error:
The type or namespace name 'ArrayList' could not be found (are you missing a using directive or an assembly reference?)
Is this something new? I love ArrayLists :)
For WinRT, they took out all of the non-generic collections - it's faster and makes your code more reliable. Use List<T> instead.
ps... this will not be your last time saying "why the heck did they take away that API?" while migrating to WinRT
ArrayList is not available in .NET 4.5 for metro style apps. Use the generic version of List, if you need an object list, use List<object>
.
For the .NET for metro style apps API reference, take a look here: http://msdn.microsoft.com/en-us/library/windows/apps/hh454064%28v=vs.110%29.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With