I have a complex c# class which has several flat members and several nested complex types.
As a general practice, I don't initialized "Nested" complex types if don't have data for them.
For example, if I have a class
Public class Person
{
public string FirstName{get;set;}
public Address{get;set;}
}
I will not do Person p = new Person(){FirstName="Test", Address = new Address()};
However, I'm TOLD to initialize "all sub" complex types even though, in my opinion this should not be case. Why allocate memory when we don't have data. How do you decide if object is empty or not. Do you compare all values/ Define some sort of lag, or defined a specialized sub class to represent empty instance.
Your feedback will be appreciated.