Table of Contents

Method ConvertArguments

Namespace
Xunit.Sdk
Assembly
xunit.v3.common.dll

ConvertArguments(object?[], Type[])

Converts arguments into their target types. Can be particularly useful when pulling attribute constructor arguments, whose types may not strictly match the parameter types.

public static object?[] ConvertArguments(object?[] args, Type[] types)

Parameters

args object[]

The arguments to be converted.

types Type[]

The target types for the conversion.

Returns

object[]

The converted arguments.