我有一个排序字典:
static SortedDictionary<string, int> myDictionary = new SortedDictionary<string, int>();
其中键代表类似这样的字符串:
string key = someNumber + " " + row + " " + col + " " + someString;
我想要的是找到排序字典中具有特定行和列的所有项目。例如,如果我有以下键:
1 2 3 p
3 2 3 p
2 2 3 t
5 1 6 p
8 2 1 p
7 2 3 t
我只想获取这些具有 row=2 和 col=3 的键:
1 2 3 p
3 2 3 p
2 2 3 t
7 2 3 t