Question: I have an API which returns `System.Collections.Generic.IEnumerable<t>`, if I import(`using`) `System.Linq`. I am able to do `Count()` / `ToList()` on the returned object. 

What would be the relation between those two(`System.Collections.Generic`, `System.Linq`), packages ?

Thanks
Pavan

Answer: 
IEnumerable<> is that relationship. Those methods (Count(), ToList()) are [extension methods](http://msdn.microsoft.com/en-us/library/vstudio/bb383977.aspx) on IEnumerable<>

This means that anything that implements IEnumerable (IList, ICollection, Arrays) they all will have those methods. To use them you need to "import" those methods with Using System.Linq; statement

A simple extension method on String. can be 

```
public static class StringExtensions 
{
    public static string CountWords(this string input )
    {
         return imnput.Split(new char[]{' '}).Length;
    }
}

```
There is a static class `Enumerable` in the `System.Linq` namespace which provides the most of extension methods you use with `IEnumerable<T>` types.