Method As
- Namespace
- LMKit.Extraction
- Assembly
- LM-Kit.NET.dll
As<T>(T)
Strongly typed projection of Value. Returns defaultValue
if cast/conversion fails.
public T As<T>(T defaultValue = default)
Parameters
defaultValue
TFallback value if the cast or conversion fails. Default is
default(T)
.
Returns
- T
Value converted to
T
, ordefaultValue
.
Type Parameters
T
Target type for conversion.
Examples
var price = resultElement.As<decimal>(0m);
Console.WriteLine(price);