2012-09-12 66 views

回答

0

你嘗試:

DataGridView [] myArray = new DataGridView [5]; 
myArray[0] = new DataGridView(); 
// ... 
+0

我需要一個2D數組,所以我做了這個 public static DataGridView [,] grid = new DataGridView [3,7]; 謝謝 –

+0

歡迎您..... – CloudyMarble

0

public static List <DataGridView> grids = new List <DataGridView>(); 
1

類似於th是

List<DataGridView> Grids = new List<DataGridView>(); 
// Assigning new DataGridViews 
for (int i = 0; i < 5; i++) 
    Grids.Add(new DataGridView()); 
// Fetching one 
DataGridView fetched = Grids[2];