list class : FindLast(class,int) method
Description
It stores the last child that matches as a value in the proxy and returns it.
Syntax
listInstance.FindLast(class searchInstance, int startIndex)
Arguments
Class | Name | Description |
class | searchInstance | An instance to search as value. |
int | startIndex | A start position of searching. |
Return value
Class | Description |
proxy | A 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.FindLast("a", 1); // The result (resultProxy) has the first child of the list. |
Notes
This method returns a last child itself that match as value.
If there is no element that matches as a value, an empty proxy is returned.
The first argument must be the int, long, real, string, or bool. It is meaningless in other types.
This method searches from the specified position toward the top of the list.
UnknownException (ArgumentOutOfOfRangeException) is thrown if the second argument is less than zero or greater than or equal to the number of elements in the list.
Links for reference
None