GuardIsDefinedT Method (T, String) |
[This is preliminary documentation and is subject to change.]
Checks if enumValue is defined on the enum type
Namespace:
CSInfrastructure.CodeContracts
Assembly:
CSInfrastructure (in CSInfrastructure.dll) Version: 1.13.0+Branch.master.Sha.d583fc64569355d188a9c0818d257b6d0d3e1339
Syntax public static T IsDefined<T>(
T enumValue,
string paramName
)
where T : Enum
Parameters
- enumValue
- Type: T
The enum value to check - paramName
- Type: SystemString
The name of the parameter being checked
Type Parameters
- T
- The type of enum
Return Value
Type:
TThe enum value being checked
Exceptions Exception | Condition |
---|
InvalidEnumArgumentException | Thrown when enumValue is not defined on T |
See Also