public Car(string carModel, string carColor)
this.carModel = carModel;
this.carColor = carColor;
Console.WriteLine("Car Model :{0} , Car Color :{1}",carModel,carColor);
public static void Main(string[] args)
Car carObj1 = new Car("Audi", "Black");
Car[] carObjArray = { carObj1, carObj2, carObj3 };
for(int i = 0; i < carObjArray.Length; i++)
if(carObjArray[i] != null)
carObjArray[i].CarDetails();