Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Static method: TResult OnExceptionDefault<TResult>(Func<TResult>, TResult)

  • Declared in: RT.Util.Ut

Declaration

public static TResult OnExceptionDefault<TResult>(
    Func<TResult> func,
    TResult default
)

Summary

Evaluates the specified code and returns its result. If the code throws any exceptions, returns default instead.

Generic type parameters

TResultThis type parameter is not documented.

Parameters

Func<TResult>func The code to be executed.
TResultdefault Value to return in case of failure.