我的应用程序从USB扫描仪读取条形码.我将它们视为令牌,然后从这些令牌中构建命令.在创建命令之前,我可能需要2次或更多次读取.我需要以某种方式存储以前的读取.实际上,在请求之间保留一些数据的正确方法是什么?在我看来,我不会使用这些令牌.
只有命令的结果可能会显示在视图中.
我想用Dictionary的TKey另一种Dictionary.类似于python的东西.我试过这个,但它给了我错误.
Dictionary<Dictionary<string, string>, int> dict = new Dictionary<Dictionary<string, string>, int>();
Dictionary<string, string> dict2 = new Dictionary<string, string>();
dict2["abc"] = "def";
dict[dict["abc"] = 20;
Run Code Online (Sandbox Code Playgroud)