我有以下類創建:遍歷集合中的C#
[Serializable]
public class AppContext : IXmlSerializable {
public string reportType = string.Empty;
public string entityId = string.Empty;
// OPTIONS
public IDictionary<string, OPTIONS> dict_Options = new Dictionary<string, OPTIONS>();
// Advanced Options
public List<string> listAdvancedOptions = new List<string>();
public class OPTIONS {
public string subjectId = string.Empty;
public string varNumber = string.Empty;
}
}
如何遍歷選擇,讓所有的varNumbers?
遍歷'listAdvancedOptions'或'dict_Options'? – Tejs 2011-05-06 19:33:39
@chris你必須點擊答案旁邊的複選標記才能接受它,你目前已經不接受 - http://stackoverflow.com/faq#howtoask – 2011-05-06 19:41:30
什麼checkmard?我只看到向上或向下的箭頭。 – chris 2011-05-06 19:43:59