AnimancerReflection.

GetNameCS(Type, bool) Method

Summary

Returns the name of the `type` as it would appear in C# code.
Assembly
Animancer.dll
Namespace
Animancer
Containing Type
AnimancerReflection

Syntax

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

Remarks

Returned values are stored in a dictionary to speed up repeated use.

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.

Parameters

Name Type Description
type Type
fullName bool

Return Value

Type Description
string