using System;
public class Program
{
public static void Main()
// Initialize D with a new A: No problem
var c1 = new C {
D = new A { B = 3 }
};
// Just initialize D's properties: Exception, because C doesn't create its own A
var c2 = new C {
D = { B = 3 }
}
public class A
public int B;
public class C
public A D;