Quantcast
Channel: Blog of Colin Angus Mackay » C# 4
Browsing index pages (3 articles)
↧

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


Image may be NSFW.
Clik here to view.

Why should you be returning an IEnumerable

I’ve seen in many places where a method returns a List<T> (or IList<T>) when it appears that it may not actually really be required, or even desirable when all things are considered. A List...

View Article


Image may be NSFW.
Clik here to view.

Dynamic Objects in C# 4.0

It seems only very recently that I was posting about this wonderful new feature in C# 3.0 called LINQ and its associated language features such as anonymous types, object initialisers and lambda...

View Article
Browsing index pages (3 articles)


Latest Images