Append Generic Type parameters to StringBuilder : ParameterInfo « Reflection « C# / C Sharp






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

1.ParameterInfo: GetParameters
2.Dumping the methods and their parameters for a class.
3.Dumps the properties names and current values from an object type (used for static classes)
4.Dumps the properties names and current values from an object
5.Gets the attributes for this parameter.
6.Gets all the custom attributes defined on this parameter.
7.If attribute of the type or its derived types is applied
8.Gets a value indicating whether this is an output parameter.
9.Gets the name of the parameter.
10.Gets the Type of this parameter.