If I subclassed list, and added a property...
class MyList : List<MyType>
{
public int MyProperty {get;set;}
}
or
class MyCollection<T> : ICollection<T>
{
public int MyProperty {get;set;}
}
I can initialize the property:
var l = new MyList() {MyProperty = 1};
Or I can initialize the list:
var m = new MyList() {new MyType(),new MyType()};
Can I initialize both the list and properties of the list?