Question: After almost 4 years of experience, I haven't seen a code where **yield** keyword is used. Can somebody show me a practical usage (along explanation) of this keyword, and if so, aren't there other ways easier to fullfill what it can do?

Answer: 
Although the merging case has already been covered in the accepted answer, let me show you the yield-merge params extension method™:

```
public static IEnumerable<T> AppendParams<T>(this IEnumerable<T> a, params T[] b)
{
    foreach (var el in a) yield return el;
    foreach (var el in b) yield return el;
}

```

I use this to build packets of a network protocol:

```
static byte[] MakeCommandPacket(string cmd)
{
    return
        header
        .AppendParams<byte>(0, 0, 1, 0, 0, 1, 0x92, 0, 0, 0, 0)
        .AppendAscii(cmd)
        .MarkLength()
        .MarkChecksum()
        .ToArray();
}

```

The `MarkChecksum` method, for example, looks like this. And it has a `yield`, too:

```
public static IEnumerable<byte> MarkChecksum(this IEnumerable<byte> data, int pos = 6)
{
    foreach (byte b in data)
    {
        yield return pos-- == 0 ? (byte)data.Sum(z => z) : b;
    }
}

```

But be careful when using aggregate methods like Sum() in an enumeration method as they trigger a separate enumeration process.
Expanding upon Jan\_V's answer, I just hit a real-world case related to it:

I needed to use the Kernel32 versions of FindFirstFile/FindNextFile. You get a handle from the first call and feed it to all subsequent calls. Wrap this in a enumerator and you get something you can directly use with foreach.