There is, you just need to sort the syntax out.
First you need this line in your code file:
using System.Collections.Generic;
Then you can declare your collection:
var foo = new List<int>();
var bar = new Dictionary<string,int>();
var baz= new Queue<myclass>();
etc...
The
List<T>
and
List(T)
you see on MSDN are really there to allow developers know the type is generic (the
T
part is the generic that needs to be specified, and is specified in different ways in the various languages supported). This is confusing when you are first getting started....