 | CollectionsExSearchT 方法 |
Sweet 开发框架
Search 返回的是目标值所在的索引,如果不存在则返回-1
命名空间:
Sweet.Common
程序集:
Sweet.Common (在 Sweet.Common.dll 中) 版本:3.10.1.0 (3.10.1.0)
语法public static int Search<T>(
IList<T> list,
T value
)
where T : IComparable
Public Shared Function Search(Of T As IComparable) (
list As IList(Of T),
value As T
) As Integer
static member Search :
list : IList<'T> *
value : 'T -> int when 'T : IComparable
参数
- list
- 类型:System.Collections.GenericIListT
列表 - value
- 类型:T
值
类型参数
- T
- 类型
返回值
类型:
Int32索引
参见