Click or drag to resize

GuardIsOfTypeT Method (Object, String)

[This is preliminary documentation and is subject to change.]

Checks if item is of type T

Namespace:  CSInfrastructure.CodeContracts
Assembly:  CSInfrastructure (in CSInfrastructure.dll) Version: 1.13.0+Branch.master.Sha.d583fc64569355d188a9c0818d257b6d0d3e1339
Syntax
C#
public static T IsOfType<T>(
	Object item,
	string paramName
)
where T : class

Parameters

item
Type: SystemObject
The object being checked
paramName
Type: SystemString
The name of the parameter being checked

Type Parameters

T
The target type

Return Value

Type: T
The object being checked
Exceptions
ExceptionCondition
ArgumentExceptionThrown when item is not an instance of T
See Also