Table of Contents

Method TryGet

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

TryGet(string, out TextExtractionResultElement)

Try to get an element by name or exact path (case-insensitive). Returns false if ambiguous or not found.

public bool TryGet(string nameOrPath, out TextExtractionResultElement element)

Parameters

nameOrPath string

Element name or exact path to resolve.

element TextExtractionResultElement

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

Returns

bool

true if exactly one element is found; otherwise, false.

Examples

if (result.TryGet("Invoice.Date", out var el))
{
    Console.WriteLine(el.As<DateTime>());
}