Question: In LinqPad I have to write

```
Console.WriteLine(result)

```

in Visual Studio I have to build something special for each case like

```
result.ToList().ForEach(x=> Console.WriteLine(x));

```

but this dosen't work for all cases.

I there an extention Method, project in Visual Studio what
can do same Magic like LinqPad do?

Answer: 
Have a look at the [ObjectDumper](https://github.com/lassevk/ObjectDumper), which is also available as [nuget](https://www.nuget.org/packages/ObjectDumper). With this package you are able to dump complex structures to your console very simply. Get the required `TextWriter` of your console by using `Console.Out` as parameter. Here is an example:

```
ObjectDumperExtensions.Dump(root, "root", Console.Out);

```
You can write your own Helper for all app. 

fast example:

```
class Car
{
    public string Id;
    public string Name;
    public override string ToString()
    {
        return String.Concat(Id, Name);
    }
}
public static class Helper
{
    public static void WriteToConsole<T>(this IList<T> collection)
    {
        Console.WriteLine(string.Join("\t", collection.ToArray()));
    }
}
class Program
{
    static void Main(string[] args)
    {
        List<Car> cars = new List<Car>();
        cars.Add(new Car() { Id = "1", Name = "Polonez Caro" });

        Helper.WriteToConsole(cars);
        Console.ReadKey();
    }
}

```