2
即使字典在調試時顯示正確的鍵/值對,它爲什麼不會返回正確的字符串?使用LINQ使用Lambda表達式查詢IDictionary
IDictionary<string, string> states =
AFS.MvcApplication.UnitedStates.StateDictionary;
string stateAbbrev =
states.Where(x => x.Key == State).Select(x => x.Value).ToString();
謝謝!!!!我正在那個車輪上旋轉...... – jallen 2012-07-10 16:59:10