In C# can casting a Char to Int32 produce a negative value?

后端 未结 5 918
时光取名叫无心
时光取名叫无心 2021-01-18 11:03

Or is it always guaranteed to be positive for all possible Chars?

5条回答
  •  萌比男神i
    2021-01-18 11:36

    Each 16-bit value ranges from hexadecimal 0x0000 through 0xFFFF and is stored in a Char structure.

    Char Structure - MSDN

提交回复
热议问题