J
Joe HM
Hello -
I was wondering that the "cleanest" way is to determine whether a
CType() will throw an InvalidCastException? I have data I receive as
an Object and I want to convert it to a String whenever possible using
CType(lObjectDummy, String) otherwise I will just ignore it.
I could put a Try/Catch As System.InvalidCastException around it but I
was wondering if that is the best solution. I once heard that
exceptions should not be used as a tool but rather as a means to
intercept problems during run-time.
Thanks,
Joe
I was wondering that the "cleanest" way is to determine whether a
CType() will throw an InvalidCastException? I have data I receive as
an Object and I want to convert it to a String whenever possible using
CType(lObjectDummy, String) otherwise I will just ignore it.
I could put a Try/Catch As System.InvalidCastException around it but I
was wondering if that is the best solution. I once heard that
exceptions should not be used as a tool but rather as a means to
intercept problems during run-time.
Thanks,
Joe