list class : Find(class) method

Description

It stores the first child that matches as a value in the proxy and returns it.

Syntax

listInstance.Find(class searchInstance)

Arguments

ClassNameDescription
classsearchInstanceAn instance to search as value.

Return value

ClassDescription
proxyA proxy with child element that match as a value.

Sample code

1:

list{string} stringList = new list{string}();

2:

stringList.Add("a");

3:

stringList.Add("b");

4:

stringList.Add("a");

5:

proxy resultProxy = stringList.Find("a"); // The result (resultProxy) has the first child of the list.

Notes

This method returns a first child itself that match as value.

If there is no element that matches as a value, an empty proxy is returned.

The argument must be the int, long, real, string, or bool. It is meaningless in other types.

This method searches from top of the list.

Links for reference

None

Copyright © Rice All rights reserved.