S
shapper
Hello,
Is there a way to check if a day, month and year values create a valid
date?
I am using the following:
try {
DateTime start = new DateTime(o.StartYear, o.StartMonth,
o.StartDay);
}
catch {
return new ValidationFailure("StartDate", "Seleccione a data
inicial");
}
return null;
Can I have do this check without using try/catch and not firing an
exception?
Thank You,
Miguel
Is there a way to check if a day, month and year values create a valid
date?
I am using the following:
try {
DateTime start = new DateTime(o.StartYear, o.StartMonth,
o.StartDay);
}
catch {
return new ValidationFailure("StartDate", "Seleccione a data
inicial");
}
return null;
Can I have do this check without using try/catch and not firing an
exception?
Thank You,
Miguel