Table of Contents

Method TryGetDecimal

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

TryGetDecimal(IReadOnlyDictionary<string, object?>, string)

Tries to get a decimal value from a deserialized JSON object.

public static decimal? TryGetDecimal(IReadOnlyDictionary<string, object?> obj, string key)

Parameters

obj IReadOnlyDictionary<string, object>

The deserialized JSON object

key string

The key for the value

Returns

decimal?

TryGetDecimal(object?)

Tries to get a decimal value from a deserialized JSON value.

public static decimal? TryGetDecimal(object? value)

Parameters

value object

The deserialized JSON value

Returns

decimal?