c# initialize list of objects
List<Cat> moreCats = new List<Cat>
{
new Cat{ Name = "Furrytail", Age=5 },
new Cat{ Name = "Peaches", Age=4 },
null
};
c# initialize list of objects
List<Cat> moreCats = new List<Cat>
{
new Cat{ Name = "Furrytail", Age=5 },
new Cat{ Name = "Peaches", Age=4 },
null
};
instantiate list with values c#
var list = new List<string> {
"test1",
"test2",
"test3"
};
initialize list in c#
List<string> optionList = new List<string>
{ "AdditionalCardPersonAdressType", /* rest of elements */ };
c# list with 0 initialize
var tenDoubles = new List<double>(new double[10]);
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us