using System.Collections.Generic;
public static void Main()
var list = new List<InnerClass>();
Console.WriteLine("AssemblyQualifiedName: " + list.GetType().AssemblyQualifiedName);
Console.WriteLine("fullname: " + list.GetType().FullName);
Console.WriteLine("name: " + list.GetType().Name);
Console.WriteLine("ns: " + list.GetType().Namespace);
Console.WriteLine("fullname: " + GetFullNameWithSlash(list.GetType()));
Console.WriteLine("fullname: " + SimpleTypeString(list.GetType()));
public static string GetFullNameWithSlash(Type type)
var names = new System.Collections.Generic.List<string>();
while (currentType != null)
names.Insert(0, currentType.Name);
currentType = currentType.DeclaringType;
return string.Join("/", names);
static string SimpleTypeString(Type type)
var str = new StringWriter();
if (!string.IsNullOrWhiteSpace(type.Namespace))
str.Write(type.Namespace);
str.Write(GetFullNameWithSlash(type));
if (type.GenericTypeArguments.Length > 0)
str.Write("<" + string.Join(",", type.GenericTypeArguments.Select(g => SimpleTypeString(g))) + ">");
public void MyRefsMethos(ref int val, out int v2)