I need to implement an array of arrays which are Textbox so that I can reuse some of the code by being able to pass this array of arrays.
I have functions that take a Textbox as a parameter.
Making an array of arrays
214605-Mar-2011
Home / DeveloperSection / Forums / Making an array of arrays
John Smith
05-Mar-2011http://www.mindstick.com/Articles/1b8bb376-f49f-4be4-9abf-7aeccf44f809/?Array%20in%20C%20NET
Uttam Misra
05-Mar-2011TextBox[][] tbArrays = new TextBox[16][];
tbArrays[0] = tbArray0;
tbArrays[1] = tbArray1;
//..
tbArrays[15] = tbArray15;
To pass such an array to a function requires a declaration such as:
void SomeFunc(TextBox[][] tbArrays)
The first element of the first array can then be accessed with the expression tbArray[0][0] and the last element of the last array with tbArray[15][15].