22 lines
623 B
C#
22 lines
623 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace HueUWP
|
|
{
|
|
public static class Extensions
|
|
{
|
|
public static string ToDelimitedString<T>(this IEnumerable<T> source, Func<T, string> func)
|
|
{
|
|
return ToDelimitedString(source, ", ", func);
|
|
}
|
|
|
|
public static string ToDelimitedString<T>(this IEnumerable<T> source, string delimiter, Func<T, string> func)
|
|
{
|
|
return String.Join(delimiter, source.Select(func).ToArray());
|
|
}
|
|
}
|
|
}
|