2d array c# with diffen types code example
Example 1: c# mixed multidimensional array
//You can't do that. Instead,
//you should create a class that contains these two properties,
//then you can create an array of that type:
public class MyClass
{
public string ControlName {get;set;}
public bool MyBooleanValue {get;set;}
}
public MyClass[] myValues=new MyClass[numberOfItems];
//use a dictionary if one of the properties is meant to be
//used to perform lookups.
// Added By Barry Cox
Example 2: how to declare 2d array in c#
// Two-dimensional array.
int[,] array2D = new int[,] { { 1, 2 }, { 3, 4 }, { 5, 6 }, { 7, 8 } };