c# initialize list inside class code example Example: c# new list object var intList = new List<int>();