ResultAds.CreateError.TValue. Method (AdsErrorCode, TValue)

Creates an Error Result.

Namespace:  TwinCAT.Ads
Assembly:  TwinCAT.Ads.Abstractions (in TwinCAT.Ads.Abstractions.dll) Version: 5.0.294+Branch.releases-5.0.Sha.90bb9a1b43b6095934fddca3e72bc0ea15da1c14

Syntax

C#

public static ResultValue<TValue> CreateError<TValue>(
    AdsErrorCode errorCode,
    TValue defaultValue
)

Parameters

errorCode

Type: TwinCAT.Ads.AdsErrorCode
The error code.

defaultValue

Type: TValue
The default value.

Type Parameters

TValue

The type of the t value.

Return Value

Type: ResultValue.TValue.
ResultValue<T>.

Reference

ResultAds Class

CreateError Overload

TwinCAT.Ads Namespace