这是我的代码:
var dict = new Dictionary<string, List<string>>
{
{"AR", new List<string> {"M4A1", "M16A4", "SCAR-L", "CM901", "TYPE 95", "G36C","ACR 6", "MK14", "AK-47", "FAD"} },
{"SM", new List<string> {"MP5","UMP45","PP90M1","P90","PM-9","MP7"}},
{"LM", new List<string>{"L86 LSW","MG36", "PKP PECHENEG","MK46","M60E4"}},
{"SR", new List<string>{"BARRET .50 CAL","L118A","DRAGUNOV","AS50","RSASS","MSR"}},
{"SG", new List<string>{"USA512","KS612","SPAS-12","AA-12","STRIKER","MODEL 1887"}},
{"RS", new List<string>{"RIOT SHIELD"}}
};
我想在文本框中的这个字典输出中的随机列表中有一个随机项目。谢谢,任何帮助表示赞赏!另外,我正在为 Windows Phone 7 开发,如果它有任何不同的话。