C#将布尔类型转换成字节数组的方法
内容摘要
本文实例讲述了C#将布尔类型转换成字节数组的方法。分享给大家供大家参考。具体如下:
byte[] b = null;
b = BitConverter.GetBytes(true);
Console.WriteLine(BitConverte
byte[] b = null;
b = BitConverter.GetBytes(true);
Console.WriteLine(BitConverte
文章正文
本文实例讲述了C#将布尔类型转换成字节数组的方法。分享给大家供大家参考。具体如下:
byte[] b = null; b = BitConverter.GetBytes(true); Console.WriteLine(BitConverter.ToString(b));
希望本文所述对大家的C#程序设计有所帮助。
代码注释