IUANode.Find<T>(browseName)

Returns a C# object that corresponds to the first child node found in the node children on which the method is invoked. The returned object is of the specified type and its name corresponds to the argument.

Tip:

In Visual Studio and Visual Studio Code, specifying the exact type (<T>) improves the intelligent code completion and makes it easier to identify errors while writing the code.

At runtime, it is evident if the node searched is of the requested type. If the searched node is not of the requested type, the API returns null.

T Find<T>(string browseName);

Arguments

T
A IUANode C# class that corresponds to the C# object class to return.
browseName (string)
The BrowseName of the node to find.

Returns

T
A C# object that corresponds to the node found.

Examples

The following example shows a returned C# object that corresponds to the first Motor1 node child of the node that contains the NetLogic:
var motor = Owner.Find<Motor>("Motor1");
var currentSpeed = motor.Speed;