Chaining the C# ?? Operator(west-wind.com)

submitted by rstrahlrstrahl(7226) 4 years ago

The C# 2.0 ?? operator makes it easy to assign a default value to nulls. Nothing new here, but did you know that you can also chain the operator to quickly check many value and find the first non-null value?

1 comment |category: |Views: 3

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:

posted by vistadbvistadb(879) 4 years ago 0

Nice, I didn't know you could chain them.

Reply

information Login or create an account to comment on this story