FO
Size: a a a
FO
OM
BD
ptr->void
?BD
FO
МБ
struct Foo {
public int a;
public int b;
}
struct Bar {
public int a;
public int b;
public int c;
}
void DoSomething(Foo f) { ... }
BD
struct Foo {
public int a;
public int b;
}
struct Bar {
public int a;
public int b;
public int c;
}
void DoSomething(Foo f) { ... }
FO
struct Foo {
public int a;
public int b;
public int d;
}
struct Bar {
public int a;
public int b;
public int c;
}
int DoSomething1(Foo f) { return f.a + f.b; } // correct
int DoSomething2(Foo f) { return f.a + f.d; } // incorrect
OM
BD
struct Foo {
public int a;
public int b;
public int d;
}
struct Bar {
public int a;
public int b;
public int c;
}
int DoSomething1(Foo f) { return f.a + f.b; } // correct
int DoSomething2(Foo f) { return f.a + f.d; } // incorrect
YS
struct Foo {
public int a;
public int b;
}
struct Bar {
public int a;
public int b;
public int c;
}
void DoSomething(Foo f) { ... }
OM
YS
FO
struct Foo {
public int a;
public int b;
}
struct Bar {
public int b;
public int a;
public int c;
}
OM
YS
OM
OM
struct Foo {
public int a;
public int b;
}
struct Bar {
public int b;
public int a;
public int c;
}
OM
FO
Foo f;-> верно, но
address(f.a[1]) == address(f.b)
Bar b;-> не верно
address(b.a[1]) != addess(b.b)