IGUtils.

GetNameCS(Type, bool) Method

Summary

Returns the name of a `type` as it would appear in C# code.

For example, typeof(List<float>).FullName would give you: System.Collections.Generic.List`1[[System.Single, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]

This method would instead return System.Collections.Generic.List<float> if `fullName` is true, or just List<float> if it is false.

Note that all returned values are stored in a dictionary to speed up repeated use.
Assembly
Kybernetik.InspectorGadgets.dll
Namespace
InspectorGadgets
Containing Type
IGUtils

Syntax

public static string GetNameCS(this Type type, bool fullName = true)

Parameters

Name Type Description
type Type
fullName bool

Return Value

Type Description
string