23 lines
1.1 KiB
C#
23 lines
1.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace DigitalData.Core.Application
|
|
{
|
|
/// <summary>
|
|
/// Provides extension methods for IEnumerable<T>.
|
|
/// </summary>
|
|
public static class EnumerableExtensions
|
|
{
|
|
/// <summary>
|
|
/// Concatenates the members of a collection, using the specified separator between each member.
|
|
/// </summary>
|
|
/// <typeparam name="T">The type of the elements of the enumerable.</typeparam>
|
|
/// <param name="enumerable">The IEnumerable<T> whose elements to concatenate.</param>
|
|
/// <param name="separator">The string to use as a separator. Separator is included in the returned string only between elements of the collection.</param>
|
|
/// <returns>A string that consists of the elements in the collection delimited by the separator string. If the collection is empty, the method returns String.Empty.</returns>
|
|
public static string Join<T>(this IEnumerable<T> enumerable, string separator = ". ") => string.Join(separator, enumerable);
|
|
}
|
|
} |