Enhanced C#
Language of your choice: library documentation

Documentation moved to ecsharp.net

GitHub doesn't support HTTP redirects, so you'll be redirected in 3 seconds.

 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
Static Public Member Functions | List of all members
Loyc.MemoizedTypeName Class Reference

.NET Framework reflection doesn't offer complete type names for generic types such as "List<int>" (the Type.Name value of that class is "List`1"). Get fills in the gap, and also saves the computed name for fast repeated lookups. More...


Source file:

Remarks

.NET Framework reflection doesn't offer complete type names for generic types such as "List<int>" (the Type.Name value of that class is "List`1"). Get fills in the gap, and also saves the computed name for fast repeated lookups.

Static Public Member Functions

static string Get (Type type)
 Computes a short language-agnostic name for a type, including generic parameters, e.g. GenericName(typeof(int)) is "Int32"; GenericName(typeof(Dictionary<int, string>)) is "Dictionary&lt;Int32, String>". More...
 
static string NameWithGenericParams (this Type t)
 Extension method on Type that is an alias for the Get method. More...
 

Member Function Documentation

static string Loyc.MemoizedTypeName.Get ( Type  type)
inlinestatic

Computes a short language-agnostic name for a type, including generic parameters, e.g. GenericName(typeof(int)) is "Int32"; GenericName(typeof(Dictionary<int, string>)) is "Dictionary&lt;Int32, String>".

Parameters
typeType whose name you want
Returns
Name with generic parameters, as explained in the summary.

The result is memoized for generic types, so that the name is computed only once.

Referenced by Loyc.MemoizedTypeName.NameWithGenericParams().

static string Loyc.MemoizedTypeName.NameWithGenericParams ( this Type  t)
inlinestatic

Extension method on Type that is an alias for the Get method.

References Loyc.MemoizedTypeName.Get().