TryGetData(IMarkdownObject, Object, out T?) Method

Definition

Namespace Markdig.Syntax
Assembly Markdig.dll

Tries to get the data associated with the specified key.

public static bool TryGetData<T>(this IMarkdownObject markdownObject, object key, scoped out T? value)

Type parameters

T
Expected data type.

Parameters

markdownObject
IMarkdownObject

The markdown object.

key
Object

The key to read.

value
{T}

The output value if found and type-compatible.

Returns

Boolean
true if the value exists and matches T; otherwise false.