M_Cyjb_Collections_ListUtil_Reverse__1_1 - CYJB/Cyjb GitHub Wiki

ListUtil.Reverse(T) 方法 (IList(T), Int32, Int32)

翻转指定列表的指定部分。

Namespace: Cyjb.Collections
Assembly: Cyjb (in Cyjb.dll) Version: 1.0.23+7750dd8e971297c5fa962a3bee37fb78f72793f6

语法

C#

public static IList<T> Reverse<T>(
	this IList<T> list,
	int index,
	int count
)

参数

 

list
Type: System.Collections.Generic.IList(T)
要翻转的列表。
index
Type: System.Int32
要翻转部分的起始索引。
count
Type: System.Int32
要翻转部分的长度。

类型参数

 

T
列表中元素的类型。

返回值

Type: IList(T)
翻转完毕的列表。

备注

在 Visual Basic 和 C# 中,这个方法可以当成为类型IList(T)的实例方法来调用。在采用实例方法语法调用这个方法时,请省略第一个参数。请参考 扩展方法 (Visual Basic)扩展方法 (C# 编程指南) 获取更多信息。

Exceptions

 

异常 条件
ArgumentNullException listnull
ArgumentOutOfRangeException indexcount 小于零。
ArgumentOutOfRangeException indexcount 之和大于列表的长度。

参见

Reference

ListUtil 类
Reverse 重载
Cyjb.Collections 命名空间

⚠️ **GitHub.com Fallback** ⚠️