Does this smell?
I have a few properties you can only set once. They can be set at any time during the objects existence and can not be undone.
I implement then like this.
private FooThingy _foo;
public FooThingy Foo
{
set { if (null == _foo) _foo = value; }
get { return _foo; }
}
But I don't like it. I feel like I have missed something. Have I?
Edit: Why I don't have it in the constructor.
I cant go into the details but setting this results in <
bad analogy>
Melting the wax statue <
/bad analogy>
. And I don't want my constructor to create already melted objects.