我想知道如何在这种情况下实现验证,我向用户触发消息,说明应该填充该字段?
try
{
if (process == null)
process = new Process ();
try
{
DateTime DateSep = DateTime.Parse (line.ItemArray [18] .ToString ());
processInterested.DateSep = DateSep;
}
catch
{
logErro.Append ("The cell S" + (line ["index"]) + "must be filled witha date.");
fileInvalidated = true;
}
}
catch (Exception error)
{
fileInvalidated = true;
logErro.Append (error.Message + "<br>");
}