Builds an easy to read type name. Namespaces will be omitted, and generic types will be displayed
in a C#-like syntax. Ideal for reporting type names in exception messages.
Namespace: SimpleInjector
Assembly: SimpleInjector (in SimpleInjector.dll) Version: 5.3.0
Syntax
Parameters
- type
- Type: SystemType
The type to convert.
Return Value
Type: StringA human-readable string representation of that type.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type Type. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).Exceptions
Exception | Condition |
---|---|
ArgumentNullException | Thrown when the supplied argument is a null reference. |
See Also