I know its a silly question that I am about to ask, but I just want to know the difference in the below given statements:
Abc object= new ABC();
object.Age=obj1.Age;
object.Place=obj1.Place;
object.Street=obj1.Street;
object.Number=obj1.Number;
object.POBox=obj1.POBox;
and
Abc object= new ABC()
{
Age=obj1.Age,
Place=obj1.Place,
Street=obj1.Street,
Number=obj1.Number,
POBox=obj1.POBox
};
Will the above written code help in increasing performance? I just want to know if there is any way we can increase the performance while creating an object of a class and assigning values to that class object?