[nem-en] usesite

vc vc at rsdn.ru
Wed Feb 14 16:10:19 CET 2007


> But this check for null makes sense only for reference types and
> nullable value types. For non-nullale value types it is redundant. How
> can I check in macro that target filed has a non-nullable value type?

You can type expressions and use IsValueType of type.
Also you can use ?? operator instead:
 (someVar ?? someDefault).GetHashCode()




More information about the devel-en mailing list