✅ filling byte array with a random int

best approach?
BinaryPrimitives.WriteInt32BigEndian(bytes, Random.Shared.Next(5000000));
//vs
bytes = BitConverter.GetBytes(Random.Shared.Next(5000000));
Was this page helpful?