There really is no good way of doing this if you are using Nullable
values along with an object reference and want to call GetType on that
variable.
Absolutely true - but generics (with type inference) can help a little
bit - i.e. if you have SomeMethod<T>(T whatever) then the caller can
use SomeMethod(localTypedValue), and then if needed you can use
typeof(T).IsValueType (or whatever). Again, however, you are
completely scuppered if you get down to "object"...
I guess the point I'm trying to make is that: in addition to "object"
as a parameter, generics *also* provide a mechanism for writing a
utility method dealing with an unpredictable object-type (normally
without changing the call syntax). However, to be effective (i.e.
typeof(T) to be useful), the calling method *must* know the actual
type [even if just another "T"] (not just "System.Object").
Marc