跳到主要内容
版本:0.1.0

Class ListEx

Assembly: RCaron.dll
View Source
Declaration
csharp
public static class ListEx
Declaration
csharp
public static class ListEx

Methods

RemoveFrom<T>(List<T>, int)

View Source
Declaration
csharp
public static void RemoveFrom<T>(this List<T> lst, int from)
Declaration
csharp
public static void RemoveFrom<T>(this List<T> lst, int from)
Parameters
TypeName
System.Collections.Generic.List<<T>>lst
System.Int32from
Type Parameters
  • T

Segment<T>(T[], Range)

View Source
Declaration
csharp
public static ArraySegment<T> Segment<T>(this T[] array, Range range)
Declaration
csharp
public static ArraySegment<T> Segment<T>(this T[] array, Range range)
Returns

System.ArraySegment<<T>>

Parameters
TypeName
<T>[]array
System.Rangerange
Type Parameters
  • T

Segment<T>(ArraySegment<T>, Range)

View Source
Declaration
csharp
public static ArraySegment<T> Segment<T>(this ArraySegment<T> segment, Range range)
Declaration
csharp
public static ArraySegment<T> Segment<T>(this ArraySegment<T> segment, Range range)
Returns

System.ArraySegment<<T>>

Parameters
TypeName
System.ArraySegment<<T>>segment
System.Rangerange
Type Parameters
  • T

FindIndex<T>(IList<T>, Predicate<T>)

View Source
Declaration
csharp
public static int FindIndex<T>(IList<T> array, Predicate<T> match)
Declaration
csharp
public static int FindIndex<T>(IList<T> array, Predicate<T> match)
Returns

System.Int32

Parameters
TypeName
System.Collections.Generic.IList<<T>>array
System.Predicate<<T>>match
Type Parameters
  • T

FindIndex<T>(IList<T>, int, Predicate<T>)

View Source
Declaration
csharp
public static int FindIndex<T>(IList<T> array, int startIndex, Predicate<T> match)
Declaration
csharp
public static int FindIndex<T>(IList<T> array, int startIndex, Predicate<T> match)
Returns

System.Int32

Parameters
TypeName
System.Collections.Generic.IList<<T>>array
System.Int32startIndex
System.Predicate<<T>>match
Type Parameters
  • T

FindIndex<T>(IList<T>, int, int, Predicate<T>)

View Source
Declaration
csharp
public static int FindIndex<T>(IList<T> array, int startIndex, int count, Predicate<T> match)
Declaration
csharp
public static int FindIndex<T>(IList<T> array, int startIndex, int count, Predicate<T> match)
Returns

System.Int32

Parameters
TypeName
System.Collections.Generic.IList<<T>>array
System.Int32startIndex
System.Int32count
System.Predicate<<T>>match
Type Parameters
  • T

IndexOf<T>(IList<T>, Predicate<T>)

View Source
Declaration
csharp
public static int IndexOf<T>(IList<T> array, Predicate<T> match)
Declaration
csharp
public static int IndexOf<T>(IList<T> array, Predicate<T> match)
Returns

System.Int32

Parameters
TypeName
System.Collections.Generic.IList<<T>>array
System.Predicate<<T>>match
Type Parameters
  • T

IsAssignableToGenericType(Type, Type)

View Source
Declaration
csharp
public static bool IsAssignableToGenericType(Type givenType, Type genericType)
Declaration
csharp
public static bool IsAssignableToGenericType(Type givenType, Type genericType)
Returns

System.Boolean

Parameters
TypeName
System.TypegivenType
System.TypegenericType

Expect<T>(object?)

View Source
Declaration
csharp
public static T Expect<T>(this object? obj)
Declaration
csharp
public static T Expect<T>(this object? obj)
Returns

<T>

Parameters
TypeName
System.Objectobj
Type Parameters
  • T

NotNull(object?)

View Source
Declaration
csharp
public static object NotNull(this object? obj)
Declaration
csharp
public static object NotNull(this object? obj)
Returns

System.Object

Parameters
TypeName
System.Objectobj

IsNumericType(Type)

View Source
Declaration
csharp
public static bool IsNumericType(this Type type)
Declaration
csharp
public static bool IsNumericType(this Type type)
Returns

System.Boolean

Parameters
TypeName
System.Typetype