0
kicks
C# Null – Which types can accept null?
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.