DataParamAttribute.

TryConvert(object, Type, object) Method

Summary

Performs several special conversions allowed by NUnit in order to permit arguments with types that cannot be used in the constructor of an Attribute such as TestCaseAttribute or to simplify their use.
Namespace
TCLite
Containing Type
DataParamAttribute

Syntax

public static bool TryConvert(object value, Type targetType, out object convertedValue)

Parameters

Name Type Description
value object The value to be converted
targetType Type The target Type in which the value should be converted
convertedValue object If conversion was successfully applied, the value converted into targetType

Return Value

Type Description
bool if value was converted and convertedValue should be used; is no conversion was applied and convertedValue should be ignored