C# Null – Which types can accept null?(www.dotnetguy.co.uk)

submitted by daniewat82daniewat82(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.

add a comment |category: |Views: 17

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

No comments so far

information Login or create an account to comment on this story