I am trying to indirectly initialize an byte[,] by not specifying the bytes sicne the should be chosen randomly.
byte[] First = BitConverter.GetBytes(rnd.Next(10000, 90000));
byte[] Second = BitConverter.GetBytes(rnd.Next(10000, 90000));
byte[] Third = BitConverter.GetBytes(rnd.Next(10000, 90000));
byte[] Fourth = BitConverter.GetBytes(rnd.Next(10000, 90000));
byte[] Fifth = BitConverter.GetBytes(rnd.Next(10000, 90000));
byte[] Sixth = BitConverter.GetBytes(rnd.Next(10000, 90000));
byte[] Seventh = BitConverter.GetBytes(rnd.Next(10000, 90000));
byte[] Eighth = BitConverter.GetBytes(rnd.Next(10000, 90000));
byte[,] Arr2D = new byte[,] { First, Second, Third, Fourth, Fifth, Sixth, Seventh, Eighth };
This is how I planned to do it, but there is a problem: It's not possible to initialize a byte[,] like so.
And I cannot specify static values for the arrays, so creating nested arrays is not possible.
What would be the correct way to initialize a byte[,] with random values like shown above?
byte[,] Arr2D = new byte[,] { { First, Second}, {Third, Fourth} };? It's not clear what goes where in your example.