我有这种代码
static void Main(string[] args) { byte[] array = new byte[2] { 0x00, 0x1f }; Console.WriteLine(BitConverter.ToInt32(array, 0)); }
但它不起作用.它引发了一个异常:
目标数组不够长,无法复制集合中的所有项目.检查数组索引和长度.
怎么了?
c# arrays type-conversion
arrays ×1
c# ×1
type-conversion ×1