Skip to content

Passion for Coding

Software Development is a Job – Coding is a Passion

  • Categories
    • C#
    • Software Development
    • Architecture
    • JavaScript
    • SQL
    • Web
    • Other
  • About
    • Consulting
    • Anders Abel

Tag: IEnumerable

Creating an Empty List<AnonymousType>

This post is written by guest blogger Albin Sunnanbo. He’s a great friend and source of inspiration and also one of the best developers I know. It was Albin that first introduced me to LINQ, EF Migrations and jQuery that I now use daily. Sometimes you use Tuple<T1, T2> in C# to store results of… Continue reading Creating an Empty List<AnonymousType>

Published 2013-02-13
Categorized as C# Tagged yield return, IEnumerable, Anonymous Types

Null Handling with Extension Methods

Often we cannot be sure if a parameter passed in to a function has a value. To write error safe code all those parameters have to be checked for null and handled. We have the ?? coalesce operator to help, but still it can be quite a lot of code. Through the use of extension… Continue reading Null Handling with Extension Methods

Published 2012-02-17
Categorized as C# Tagged Extension Methods, Utilities, IEnumerable, Null

Return IEnumerable with yield return

Ever needed to return an IEnumerable<T> from a method? Did you create a List<T> instance that you populated and returned? There is a better way, with less memory footprint and better performance. The yield return statement is one of the more mysterious, yet very useful constructs in C#. With yield return it is possible to… Continue reading Return IEnumerable with yield return

Published 2011-12-08
Categorized as C# Tagged yield return, IEnumerable

I'm Anders Abel, an independent systems architect and developer in Stockholm, Sweden.

profile for Anders Abel at Stack Overflow, Q&A for professional and enthusiast programmers

Code for most posts is available on my GitHub account.

Popular Posts

  • Understanding the Owin External Authentication Pipeline
  • Programmer Time Translation Table
  • Don’t use Linq’s Join. Navigate!
  • jQuery UI Replacement for alert()
  • Prevent Page behind JQuery UI Dialog from Scrolling

Archives

Series

Passion for Coding
Proudly powered by WordPress.