using System.Collections.Generic;
public static class ExtensionLib {
public static string GetClassName(this Type objType)
string result = objType.Name;
if (objType.IsGenericType)
var name = objType.Name.Substring(0, objType.Name.IndexOf('`'));
var genericTypes = objType.GenericTypeArguments;
result = string.Format("{0}<{1}>",name,string.Join(",", genericTypes.Select(GetClassName)));
public static void Main()
Console.WriteLine(typeof(List<List<int>>).GetClassName());