> 構造体のメンバに動的配列を指定することは可能なのでしょうか? …何の問題もありませんですよ? using System; using System.Collections.Generic; public struct O_HISTORY { public string Name; public List<string> History; } public class Program { public static void Main() { O_HISTORY o_his; o_his.History = new List<string>(); o_his.History.Add("とまと"); o_his.History.Add("きゅうり"); foreach (string str in o_his.History) { Console.WriteLine(str); } } }
- Child Tree -