It is not simple. Like variables in a method, they are almost the same as int , so 4 bytes; they are single-byte inside the array. Like a field ... I needed to check; I assume that adding means that they can be considered as 4 bytes. A struct with sizeof should show ...
struct Foo { byte a, b, c; } static class Program { unsafe static void Main() { int i = sizeof(Foo);
Here i shows 3, so they are single-byte like fields, but (see codymanix comments) an additional addition may be needed when other types are involved - for example:
struct Foo { byte a, b, c; int d; }
is 8 bytes, due to the need for alignment d . Fun funny fun.
Marc gravell
source share