Hello,
I am writing a data serialization routine, and need to determine the value
type for each element in given hashtable. Number types should be treated in
one way, string and char types in other way, regex type in other, and arrays
in just another. Now I am quite confused about what could be the best
strategy for this type checking. Of course, I can do
myVar.getType().ToString() to get the full type identifier. But, I'd be
happy for some kind of "isNumeric" method that would straightforward give
feedback whether the given type is nueric one. Arrays could be checked by
comparing with the IList interface.
So, among all the different choices, what would be the best way?
Thanks,
Pavils