InstanceCollection.T..TryGetInstance Method

Tries to get the IInstance. of the specified path.

Namespace:  TwinCAT.TypeSystem.Generic
Assembly:  TwinCAT.Ads (in TwinCAT.Ads.dll) Version: 4.3.0.0

Syntax

C#

public bool TryGetInstance(
    string instanceSpecifier,
    out T symbol
)

VB

Public Function TryGetInstance ( 
    instanceSpecifier As String,
    <OutAttribute> ByRef symbol As T
) As Boolean

Parameters

instanceSpecifier

Type: System.String
The instance path or Instance Name (dependent of Mode setting)

symbol

Type: T.
The symbol.

Return Value

Type: Boolean
true if the IInstance is found; otherwise, false

Implements

IInstanceCollection.T..TryGetInstance(String, T.)

Exceptions

Exception

Condition

ArgumentNullException

instancePath

ArgumentException

Reference

InstanceCollection.T. Class

TwinCAT.TypeSystem.Generic Namespace