Table of Contents

Method TryConvert

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

TryConvert<T>(object, out T?)

Attempts to convert the specified value to type T.

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

Parameters

value object

The value to convert.

result T

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

Returns

bool

true if the conversion was successful; otherwise, false.

Type Parameters

T

The type to which the value should be converted.