NetworkExtensionsBinarySearch Method (IListIReach, ILocation) |
Find the reach that includes the given location. Assuming the reaches are sorted.
Location comparisons are case insensitive.
Namespace:
DHI.Mike1D.NetworkDataAccess
Assembly:
DHI.Mike1D.NetworkDataAccess (in DHI.Mike1D.NetworkDataAccess.dll) Version: 16.0.0.0 (11.1.1.1111)
Syntax public static int BinarySearch(
this IList<IReach> reaches,
ILocation location
)
Parameters
- reaches
- Type: System.Collections.GenericIListIReach
List of reaches to search in - location
- Type: DHI.Mike1D.GenericILocation
Location to find
Return Value
Type:
Int32The zero-based index of item in the sorted
IListT, if item is found;
otherwise, a negative number that is the bitwise complement
of the index of the next element that is larger than item or,
if there is no larger element, the bitwise complement of Count.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IListIReach. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also