M_Cyjb_Collections_ListUtil_PrevPermutation__1 - CYJB/Cyjb GitHub Wiki
将当前列表中的元素变换为上一排列。
Namespace: Cyjb.Collections
Assembly: Cyjb (in Cyjb.dll) Version: 1.0.23+7750dd8e971297c5fa962a3bee37fb78f72793f6
C#
public static bool PrevPermutation<T>(
this IList<T> list,
Comparer<T>? comparer = null
)
- list
- Type: System.Collections.Generic.IList(T)
要变换为上一排列的列表。 - comparer (Optional)
- Type: System.Collections.Generic.Comparer(T)
列表元素的比较器。
- T
- list 中的元素的类型。
Type: Boolean
如果排列存在,则为 true
;否则变换为末排列并返回 false
。
在 Visual Basic 和 C# 中,这个方法可以当成为类型IList(T)的实例方法来调用。在采用实例方法语法调用这个方法时,请省略第一个参数。请参考 扩展方法 (Visual Basic) 或 扩展方法 (C# 编程指南) 获取更多信息。