Answers for "populate list c#"

C#
2

instantiate list with values c#

var list = new List<string> {
  "test1",
  "test2",
  "test3"
};
Posted by: Guest on September-02-2020
0

c# create and populate int list

var numberList = Enumerable.Range(1, 10).ToList();
Posted by: Guest on September-30-2021
0

how to populate list in c#

var list = new List<IMyCustomType>{ 
    new MyCustomTypeOne(), 
    new MyCustomTypeTwo(), 
    new MyCustomTypeThree() 
};
Posted by: Guest on September-02-2021

C# Answers by Framework

Browse Popular Code Answers by Language