我有一本建立在下面的字典
Dictionary<string, string> GTNMobilelist = new Dictionary<string, string>();
GTNMobilelist = LoadMobileNumbers();
然后我需要查询字典以检查字典“希望有意义”中是否存在已输入到文本框中的手机号码:-/
这就是我所拥有的
foreach (GridViewRow HandSetRow in grdvHandSets.Rows)
{
TextBox txtmobileNumber = (TextBox)HandSetRow.FindControl("txtmobilenumber");
//I need the linq statement here if the mobile number doesnt exists i need to
//throw an error saying mobile number doesnt exist within the dictionary
//iv been looking at linq statements for the past hour and im confused :(
}
任何人都可以帮助我快速解决这个问题吗?