I honestly tried googling the answer but couldn't. Ok, i have a structure like this:
struct TestStruct
{ public int n;
public struct _InnerStruct { public int m; }
public _InnerStruct InnerStruct;
}
And I can assign the value to some local variable in the n field:
static void Main ()
{
int SomeLOCALvar = 1;
TestStruct TEST_STRUCT = new TestStruct () { n = SomeLOCALvar };
}
My problem is that I don't understand how to do exactly the same with the m field. Why doesn't code like this compile:
TestStruct TEST_STRUCT = new TestStruct () { n = SomeLOCALvar, .InnerStruct.m = SomeLOCALvar };
What would be the correct syntax?