c# declare list of objects with values code example Example: c# new list object var intList = new List<int>();