A
Armin Zingler
Jason Pettys said:I don't understand your question.
Just like I didn't understand yours.
As I said in my first reply to
the OP: "It probably wouldn't matter much on a Win Forms app, but I
would really back away from this on ASP.NET if you're expecting any
volume of traffic."
I didn't know the client machine is not able to check this. Such a lot of
resources wasted!
In the latter case I would anticipate that a lot of unnecessary
exceptions would cause a noticeable performance penalty. In the
former case I think one could get by with a Try/Catch. I guess my
point was that there are cases where optimization should be a
concern even when the only validation is of user-entered data, and
one should be aware of both sides when picking how to validate
dates.
Don't you agree that a developer should be aware that in some cases
the exception-based approach can be a performance problem?
I do agree. What I explained in my previous post: If you want to use
date.parse, you must use try/catch for the reasons given. By saying "use
date.parse" I mean "permit the format(s) that date.parse permits". If you
don't use date.parse, it's up to you, of course.
Armin
Maybe I