Table of Contents

Method TryGetInt

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

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

Tries to get an int value from a deserialized JSON object.

public static int? TryGetInt(IReadOnlyDictionary<string, object?> obj, string key)

Parameters

obj IReadOnlyDictionary<string, object>

The deserialized JSON object

key string

The key for the value

Returns

int?

TryGetInt(object?)

Tries to get an int value from a deserialized JSON value.

public static int? TryGetInt(object? value)

Parameters

value object

The deserialized JSON value

Returns

int?