Table of Contents

Method TryConvert

Namespace
Terminal.Gui.Views
Assembly
Terminal.Gui.dll

TryConvert<TValue>(object, out TValue?)

Attempts to convert the specified value to type TValue.

public static bool TryConvert<TValue>(object value, out TValue? result)

Parameters

value object

The value to convert.

result TValue

When this method returns, contains the converted value if the conversion succeeded, or the default value of TValue if the conversion failed.

Returns

bool

true if the conversion was successful; otherwise, false.

Type Parameters

TValue

The type to which the value should be converted.