Class TypeArgumentException
- Namespace
- Gamelogic.Extensions
- Assembly
- Gamelogic.Extensions.dll
Thrown when a method is called with illegal type parameters, or a class is constructed with illegal type parameters.
public class TypeArgumentException : Exception, ISerializable
- Inheritance
-
TypeArgumentException
- Implements
- Inherited Members
- Extension Methods
Remarks
Normally, it is preferable to use type constraints, but in some cases this is not possible. This exception can be thrown in such cases.
Constructors
- TypeArgumentException(string)
Initializes a new instance of TypeArgumentException with the given message.
- TypeArgumentException(string, string)
Initializes a new instance of TypeArgumentException for a specific type parameter.
Fields
- parameterName
The name of the type parameter that caused the exception.