SpecFlow 1.9

Finally a new version of SpecFlow is out.

Lazy component injection

Ever felt it's a waste when injected components aren't used in certain execution paths?

Slice business logic into bounded contexts

Domain model objects are extended with business logic that are valid in only certain contexts.

Singleton Pattern

Singleton pattern with lock

IEnumerable or ICollection or IList

A list is a collection who is enumerable

Reference vs Value in WCF

WCF turns referenced objects into value data by default. This is a behavior that can cause trouble and decrease performance. Learn how to define reference or value style navigation for your serialized data.

List of strings into a comma separated string

Convert a sequence of strings into one string with a delimiter separating each projected string element.

Conditional Operator and Null-Coalescing Operator

Two "no need for if"-operators to remind of.

Convert string with integers into an int array

Comma separated list of integers converted into an int array using C# and LINQ.

Value types and Reference types

There's two type of types in C#. Value and Reference types. Too many developers miss to understand these concepts resulting in misunderstanding and logical errors when copying variables or using function parameters etc.

Convert an IP address string to an integer

IP addresses are really 4 byte integers. This function converts an IP string like "192.168.0.1" into its numerical equivalent.