Table of Contents

Method TryGetValue

Namespace
LMKit.Extraction
Assembly
LM-Kit.NET.dll

TryGetValue(string, out object)

Tries to get the value by name or path as object. Returns true if found; otherwise false.

public bool TryGetValue(string nameOrPath, out object value)

Parameters

nameOrPath string

Element name or exact path to resolve.

value object

When this method returns, contains the resolved value if found; otherwise null.

Returns

bool

true if a single value is found; otherwise, false.

Examples

object v;
if (result.TryGetValue("bill_to.street_address", out v))
{
    Console.WriteLine(v);
}
else
{
    Console.WriteLine("Not found");
}