How to turn or change the logic below into a dynamic collection initializer in code. I want to do this dynamically base upon new incoming data or new incoming cars.
Java
List cars = new List
{ new Car { Name = "Corvette", Color = Color.Yellow },
new Car { Name = "Golf", Color = Color.Blue}
};
Tapan PatelRank #614 · 3.9K reputationPosted Jul 28, 2016, 5:54 PM EDT