显示数组中的元素
在VS.NET中创建了一个Windows应用程序,在其中添加了一个DataGrid控件、一个Retrieve按钮,通过单击此按钮,如何在DataGrid控件中显示某个数组中的元素?
我已经为数组建立了一个包装类,代码如下:
protected class Item
{
private string m_text;
public Item(string text)
{
m_text=text;
}
public string Text
{
get {return m_text;}
}
}
如何建立一个此类的数组,然后在Retrieve按钮的Click事件处理程序中编写代码在DataGrid中显示数组中的元素??