Quantcast
Channel: Blog of Colin Angus Mackay » C# 2
Browsing latest articles
Browse All 2 View Live

Image may be NSFW.
Clik here to view.

The simplicity of nullable types

I just discovered nullable types. Wow! They are really simple and such a powerful feature. Just see for yourself…. If you have an int or a DateTime or any other value type you’ll already know that you...

View Article



Image may be NSFW.
Clik here to view.

Tip of the day: Using the null-coalescing operator over the conditional operator

I’ve recently been refactoring a lot of code that used the conditional operator and looked something like this: int someValue = myEntity.SomeNullableValue.HasValue ? myEntity.SomeNullableValue.Value :...

View Article
Browsing latest articles
Browse All 2 View Live




Latest Images