 | MathExBinarySearch 方法 (ListInt32, Int32) |
Sweet 开发框架
二分查找与最近值序号
命名空间:
Sweet.Common
程序集:
Sweet.Common (在 Sweet.Common.dll 中) 版本:3.10.1.0 (3.10.1.0)
语法public static int BinarySearch(
List<int> list,
int target
)
Public Shared Function BinarySearch (
list As List(Of Integer),
target As Integer
) As Integer
static member BinarySearch :
list : List<int> *
target : int -> int
参数
- list
- 类型:System.Collections.GenericListInt32
列表 - target
- 类型:SystemInt32
值
返回值
类型:
Int32最近值序号
参见