Append Generic Type parameters to StringBuilder
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
public static class UtilityExtension
{
public static void Append<T>(this StringBuilder sb, params T[] args)
{
sb.Append(args);
}
public static void Append<T>(this StringBuilder sb, IEnumerable<T> args)
{
foreach (var val in args)
{
sb.Append(val);
}
}
}
Related examples in the same category