It couldn't be a byte telling how many fields the struct have, because a struct that have only one byte will also return sizeof 1
Asked
Active
Viewed 48 times
0
-
Related: [Why sizeof of a struct is unsafe](https://stackoverflow.com/q/17105504/215552) and [sizeof operator gives extra size of a struct in C#](https://stackoverflow.com/q/35960311/215552) – Heretic Monkey Dec 02 '19 at 20:02
-
if google sends you here based on the original question content, the answer to the question I duplicated have a great solution to differentiate empty and non empty structs – Guedez Dec 02 '19 at 20:05