Why isn't the size of a bool data type only 1 bit in C#? -


i learning c# , looking deeper data types.

why isn't bool data type 1 bit in size?

it seems can hold 1 of 2 values (true or false), wouldn't take 1 bit of space represent value?

is because smallest 'addressable' size of value byte (8 bits) referred in this post?

my overall aim logically envisage different size of each data type in c# trying create list of data types , allocated bit size , threw me.

is because smallest 'addressable' size of value byte

yep, same thing. in order clr efficient, maps data types native machine data types in same way compiler in c++ (pretty much).


Comments