I wrote a method that accepts a generic parameter and then it prints its properties. I use it to test my web service. It\'s working but I want to add some features that I do
I usually prints list with a , between each item.
To make that easy I have created a simple extension method:
public static class ListEx
{
public static string StringJoin(this IEnumerable items)
{
return string.Join(", ", items);
}
}
Call the method as myList.StringJoin().
You can of course modify the method to use another delimiter och call string.Join directly.