オブジェクトをインスタンス化するときにオブジェクト初期化子を使用する場合、そのオブジェクトコンストラクターは初期化されたプロパティにアクセスできますか?
public class ExampleClass {
public string proptery1 { get; set; }
public string property2 { get; set; }
public ExampleClass() {
if(!string.IsNullOrEmpty(property1)) {
...
}
}
}
ExampleClass exampleClass = new ExampleClass() {
property1 = "hello",
property2 = "world"
};