- 832 名前:デフォルトの名無しさん mailto:sage [2008/02/21(木) 19:08:36 ]
- >>821
配列版は出ているので、ジェネリックのコレクション版で System.Collections.Generic.List 版でも作っておきます。 class 行の定義 { int f1; string f2; public int 行番号 { get { return f1; } set { f1 = value; } } public string 内容 { get { return f2; } set { f2 = value; } } public 行の定義(int a1, string a2) { 行番号 = a1; 内容 = a2; } } 実行するコード System.Collections.Generic.List<行の定義> table = new List<行の定義>(); table.Add(new 行の定義(1, "ABC")); table.Add(new 行の定義(2, "DEF")); table.Add(new 行の定義(3, "GHI")); dataGridView1.DataSource = table; これなら2.0でも大丈夫……だと思う
|

|