Catch exception help please
Doing simple date work and trying to validate a date.
this.Label1.Text="Bad Date was attempted";
private void TextBox1_TextChanged(object sender, System.EventArgs e)
{
try
{
Convert.ToDateTime( this.TextBox1.Text.ToString());
}
catch(Exception ee)
{
this.Label1.Text="Bad Date was attempted";
}
What is the catch() expression to catch a bad date like 18/31/2004
Exception ee is missing it?
TIA

asic104 reputationPosted Aug 13, 2004, 3:46 AM EDT
asic104 reputationPosted Aug 13, 2004, 3:53 AM EDT
srussell21 reputationPosted Aug 13, 2004, 5:11 AM EDT
mikerRank #2,843 · 502 reputationPosted Aug 13, 2004, 6:08 AM EDT
MykonineRank #2,671 · 521 reputationPosted Aug 13, 2004, 10:11 AM EDT
david 0Rank #8,108 · 228 reputationPosted Aug 22, 2004, 7:17 AM EDT