Possible Duplicates:
How to check if an object is nullable?
Determine if reflected property can be assigned null
How can I properly identify if a variable (or a class member) of given type can take null
? More specifically how to handle Nullable<T>
since it is not a reference type? Or any other type that may have some weirdo implicit conversion defined on it.
My gut feeling is that the only sure way to find out is to try{} catch{}
it and see if it blows up... But maybe there are some tricks to it.