I have a custom struct :
struct A
{
public int y;
}
a custom class with empty constuctor:
class B
{
public A a;
public B()
{
}
}
and here is the main:
static void Main(string[] args)
{
B b = new B();
b.a.y = 5;//No runtime errors!
Console.WriteLine(b.a.y);
}
When I run the above program, it does not give me any errors, although I did not initialize struct A in class B constructor..'a=new A();'