Dictionary<string, int> queryWhere = new Dictionary<string, int>();
distDictionary.Add("k1", 1);
distDictionary.Add("k2", 1000);
distDictionary.Add("k3", 1600);
private string GetValue(string key)
{
string returnValue;
if(!queryWhere.TryGetValue(key, out returnValue))
{
returnValue= string.Empty;
}
return returnValue;
}
string account = GetValue("kl");
string customer = GetValue("k5");
distDictionary.Add("k1", 1);
distDictionary.Add("k2", 1000);
distDictionary.Add("k3", 1600);
private string GetValue(string key)
{
string returnValue;
if(!queryWhere.TryGetValue(key, out returnValue))
{
returnValue= string.Empty;
}
return returnValue;
}
string account = GetValue("kl");
string customer = GetValue("k5");