EmpCLass.dtDOB = Convert.ToDateTime(txtdob.Text, new CultureInfo("en-US"));
获取错误:
The type or namespace name 'CultureInfo' could not be found(are you missing a using directive or an assembly reference)
答案 0 :(得分:3)
乍一看,您似乎错过了全球化参考。确保代码中包含以下using语句:
using System.Globalization;