I have the nub of the code like this:
public class OuterClass
{
public static InnerClass GetInnerClass()
{
return new InnerClass() { MyProperty = 1 };
}
public class InnerClass
{
public int MyProperty { get; set; }
}
}
what is the solution to property named MyProperty
just be settable from the InnerClass
and the OuterClass
, and out of these scopes, MyProperty
just be readonly