Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link
URL Rewriter Bot
URL Rewriter Bot

Yes you can store like this

ArrayList aa = new ArrayList();
aa.Add(false);
aa.Add(1);
aa.Add("Name");

ArrayList belongs to the days that C# didn't have generics. It's deprecated in favor of List. You shouldn't use ArrayList in new code that targets .NET >= 2.0 unless you have to interface with an old API that uses it.

ArrayList vs List<> in C#ArrayList vs List<> in C#

Yes you can store like this

ArrayList aa = new ArrayList();
aa.Add(false);
aa.Add(1);
aa.Add("Name");

ArrayList belongs to the days that C# didn't have generics. It's deprecated in favor of List. You shouldn't use ArrayList in new code that targets .NET >= 2.0 unless you have to interface with an old API that uses it.

ArrayList vs List<> in C#

Yes you can store like this

ArrayList aa = new ArrayList();
aa.Add(false);
aa.Add(1);
aa.Add("Name");

ArrayList belongs to the days that C# didn't have generics. It's deprecated in favor of List. You shouldn't use ArrayList in new code that targets .NET >= 2.0 unless you have to interface with an old API that uses it.

ArrayList vs List<> in C#

Source Link
andy
  • 6.1k
  • 2
  • 29
  • 50

Yes you can store like this

ArrayList aa = new ArrayList();
aa.Add(false);
aa.Add(1);
aa.Add("Name");

ArrayList belongs to the days that C# didn't have generics. It's deprecated in favor of List. You shouldn't use ArrayList in new code that targets .NET >= 2.0 unless you have to interface with an old API that uses it.

ArrayList vs List<> in C#