赋值
List<Tuple<string, int>> cc = new List<Tuple<string, int>>() { new Tuple<string, int>("满减5", 1), new Tuple<string, int>("满减2", 2), new Tuple<string, int>("满减5", 3), new Tuple<string, int>("满减1", 4) };
取值
1 foreach (var item in cc) 2 { 3 string ite = item.Item1; 4 int ctNum = item.Item2; 5 }
说明:可以当一个简单的类来用
时间: 2024-10-12 19:46:17