我正在查看一个代码块,无法理解该行发生了什么 - formValues.AllKeys.Contains("Email_" + i);
看起来应该进行分配但是......
public ActionResult EditAdditionalLocations(int ID, int? count, FormCollection formValues)
{
...
for (int i = 0; i < _count; i++)
{
formValues.AllKeys.Contains("Email_" + i);
if (locations.Emails.Count > i)
{
locations.Emails[i] = formValues["Email_" + i];
}
else
{
locations.Emails.Add(formValues["Email_" + i]);
}
}
}