-1
我需要從字典中是這樣的格式獲取數據:從嵌套字典獲取值
private Dictionary<string, Dictionary<string, string>> MyDictionary = new Dictionary<string, Dictionary<string, string>>()
{
{"HEIGHT", new Dictionary<string,string>(){{"table", "TR_HEIGHT"}, {"prefix", "HEI"}}},
{"WEIGHT", new Dictionary<string,string>(){{"table", "TR_WEIGHT"}, {"prefix", "WIL"}}},
{"LENGTH", new Dictionary<string,string>(){{"table", "TR_LENGTH"}, {"prefix", "LEN"}}},
};
它是更多鈔票來,如果我插入「高度」我回來的前綴是「HEI」和表「TR_HEIGHT」?
感謝的
如果密鑰是已知的始終存在:'VAR前綴= MyDictionary [ 「HEIGHT」] [ 「前綴」];' –
該代碼不編譯 – Alberto
'是更多鈔票如果我插入「HEIGHT」,我回來的前綴是「HEI」,表格是「TR_HEIGHT」?' 請明確。 – Tarec