C# Null – Which types can accept null?(www.dotnetguy.co.uk)
submitted by
daniewat82(114) 2 years ago
A few days ago someone asked me which types can accept null and also how could this be determined at runtime. After a quick Google and some chit chat we found that only if the variables type is not a value type or the variables type has a generic type definition of Nullable<> can the variable accept null . This is really helpful to know when you are dynamically invoking methods at runtime and you are not sure if the methods parameters will accept the passed in values.
|category: C#
|Views: 17
tags:
C# another
Everyones tags:
Your Tags: