[ ] C# |
Random rnd1 = new Random(DateTime.UtcNow.Millisecond);
int[,] arr1 = new int[Int16.MaxValue, Byte.MaxValue];
for (int i = 0; i < arr1.GetLength(0); i++)
{
for (int j = 0; j < arr1.GetLength(1); j++)
{
arr1[i, j] = rnd1.Next(Int32.MinValue, Int32.MaxValue);
}
}
Random rnd1 = new Random(DateTime.UtcNow.Millisecond);
int[,] arr1 = new int[Int16.MaxValue, Byte.MaxValue];
int len1 = arr1.GetLength(0), len2 = arr1.GetLength(1);
for (int i = 0; i < len1; i++)
{
for (int j = 0; j < len2; j++)
{
arr1[i, j] = rnd1.Next(Int32.MinValue, Int32.MaxValue);
}
}
https://habr.com/ru/post/438516/?utm_source=habrahabr&utm_medium=rss&utm_campaign=438516