I have this kind of code
static void Main(string[] args)
{
byte[] array = new byte[2] { 0x00, 0x1f };
Console.WriteLine(BitConverter.ToInt32(array, 0));
}
However it does not work. It throws an exception:
Destination array is not long enough to copy all the items in the collection. Check array index and length.
What is wrong?