stakx / TypeNameFormatter

A small .NET library for formatting type names à la C#.
MIT License
33 stars 4 forks source link

Open generic types shouldn't have parameter names included #2

Closed stakx closed 6 years ago

stakx commented 6 years ago

For example:

var type = typeof(IEnumerable<>);
Console.WriteLine(type.GetFormattedName());
// => IEnumerable<T>

Since the type parameter name T isn't mentioned in C# code, it probably shouldn't end up in the formatted string, either.

stakx commented 6 years ago

Done in 2e23fb69d0d946fabd49ebb34baefafccd6b33a1.