how to use a 2d array in csharp
int[,] arr = new int[3,3];//declaration of 2D array
int[,] arr = { { 1, 2, 3 }, { 4, 5, 6 }, { 7, 8, 9 }}//another way to declare
arr[1,2]=20; //access to the array
how to use a 2d array in csharp
int[,] arr = new int[3,3];//declaration of 2D array
int[,] arr = { { 1, 2, 3 }, { 4, 5, 6 }, { 7, 8, 9 }}//another way to declare
arr[1,2]=20; //access to the array
C# public 2d array
// in namespace, above main form declaration
public class Globals
{
public static string[,] tableArray;
}
//... in main or other method
Globals.tableArray = new string[rowLength,colLength];
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us