algorithms-sandbox/sorting/dotnet/Sorting/ListExt.cs

13 lines
283 B
C#
Raw Normal View History

2018-03-21 17:19:24 +01:00
using System.Collections.Generic;
using System.Linq;
namespace Sorting
{
public static class ListExt
{
public static string AsString(this List<int> list)
{
return "(" + string.Join(", ", list.Select(x => x.ToString())) + ")";
}
}
}