Does initializing custom type do initialization for all props inside it ? I am asking this regarding performance and consumption of memory at client. In dot net if I create custom type something like
public class myCustomType
{
public string prop1 {get;set;}
public string prop2 {get;set;}
public string prop3 {get;set;}
public string prop4 {get;set;}
}
when somewhere else in code I do
var parOfmyCustomType = new myCustomType (){ prop1 = "stingToHold" };
var listOfCustom = new list<myCustomType>(){ parOfmyCustomType };
Regrading of memory consumed, does my app using memory for all sting props when I create myCustomType and set prop vale of only one