Property Initialization during object instantiation C# with Example



Property Initialization during object instantiation C# with Example

Properties can be set when an object is instantiated. 
var redCar = new Car 
{ 
Wheels = 2, 
Year = 2016, 
Color = Color.Red 
}; 

0 Comment's

Comment Form

Submit Comment