I need some way to get the Name of a Type, when type.IsGenericType = true.
type.IsGenericType
true
Type t = typeof(List); MessageBox.
Type t = ...; if (t.IsGenericType) { Type g = t.GetGenericTypeDefinition(); MessageBox.Show(g.Name); // displays "List`1" MessageBox.Show(g.Name.Remove(g.Name.IndexOf('`'))); // displays "List" }