当我尝试将 int 与 int 进行比较时出现此错误(在比较字符串时它有效)
IEnumerable<Commune> myCommunes = from d in db.Communes
where d.CodePostal == Convert.ToInt32(CodePostal.Text)
select d;
foreach (Commune c in myCommunes)
{
CommunesList.Add(c);
}
有任何想法吗 ?