Skip to content

Instantly share code, notes, and snippets.

@shaybensasson
Created March 4, 2015 09:08
Show Gist options
  • Select an option

  • Save shaybensasson/6fb80c2cd93bff03ba89 to your computer and use it in GitHub Desktop.

Select an option

Save shaybensasson/6fb80c2cd93bff03ba89 to your computer and use it in GitHub Desktop.
AggregateToString
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
public static class LinqExtensions
{
public static string AggregateToString<T>(this IEnumerable<T> input, string seperator)
{
var ar = input.Select(i => i.ToString()).ToArray();
return string.Join(seperator, ar);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment