in c#, not really - although some types do have a .TryParse() function.
If you wish to, you can reference Microsoft.VisualBasic, and use the
IsNumeric, IsDate, etc functions defined there. However, some of those have
lots of code in them, and my not actually be more performant than try/catch.
Lastly, you could use a compiled regular expression to match the data, which
(After the first time) will probably be faster than either other method.
-Philip
"Daniel" <an*******@discussions.microsoft.com> wrote in message
news:08****************************@phx.gbl...
Hello,
maybe this is an easy one:
Is there any way to check, if a string value can be
converted into another type (e.g. DateTime, Integer)
without using exceptions (try/catch)?
Thanks in advance,
Daniel