G
Guest
Hi
How do I check if a date is valid (C#)? I don't want to use exception handling because there will be thousands of strings checked in a short period, many of which will not contain invalid dates, so a try/catch block around (say) System.Convert or DateTime.Parse will offer poor performance. I want to check if a string contains a valid date without using any exception handling. Any ideas
Many thanks
Richard
How do I check if a date is valid (C#)? I don't want to use exception handling because there will be thousands of strings checked in a short period, many of which will not contain invalid dates, so a try/catch block around (say) System.Convert or DateTime.Parse will offer poor performance. I want to check if a string contains a valid date without using any exception handling. Any ideas
Many thanks
Richard