質問編集履歴
2
追記&修正
title
CHANGED
@@ -1,1 +1,1 @@
|
|
1
|
-
【Unity】【C#】独自クラスの
|
1
|
+
【Unity】【C#】独自クラスの異なる型のすべての要素を楽に取り出して表示したい
|
body
CHANGED
File without changes
|
1
追記&修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -17,11 +17,17 @@
|
|
17
17
|
public int Quantity{get; set;}
|
18
18
|
public string ProductName{get; set;}
|
19
19
|
}
|
20
|
-
public List<CustumData> ProductList;
|
20
|
+
public List<CustumData> ProductList;
|
21
21
|
|
22
|
+
ProductListの中身は例として以下のような状態とする。
|
23
|
+
ProductList[0] = 5,10,pen
|
24
|
+
ProductList[1] = 2,7,desk
|
25
|
+
ProductList[2] = 8,45,watch
|
26
|
+
ProductList[3] = 14,3,sword
|
27
|
+
|
22
28
|
foreach(var a in ProductList)
|
23
29
|
{
|
24
|
-
|
30
|
+
各ProductList[n]の中身をすべて出力したい
|
25
31
|
}
|
26
32
|
|
27
33
|
```
|