SoftBasicArraySplitByLengthT 方法 |
将指定的数据按照指定长度进行分割,例如int[10],指定长度4,就分割成int[4],int[4],int[2],然后拼接list
Divide the specified data according to the specified length, such as int [10], and specify the length of 4 to divide into int [4], int [4], int [2], and then concatenate the list
命名空间:
HslCommunication.BasicFramework
程序集:
HslCommunication (在 HslCommunication.dll 中) 版本:12.1.2.0 (12.1.2.0)
语法 public static List<T[]> ArraySplitByLength<T>(
T[] array,
int length
)
Public Shared Function ArraySplitByLength(Of T) (
array As T(),
length As Integer
) As List(Of T())
public:
generic<typename T>
static List<array<T>^>^ ArraySplitByLength(
array<T>^ array,
int length
)
static member ArraySplitByLength :
array : 'T[] *
length : int -> List<'T[]>
参数
- array
- 类型:T
等待分割的数组 - length
- 类型:SystemInt32
指定的长度信息
类型参数
- T
- 数组的类型
返回值
类型:
ListT分割后结果内容
示例 int[] b1 = new int[10] { 12341, -2324, 84646, 324245, 352, 654332, 7687632, 435, 234, 3434 };
List<int[]> b2 = SoftBasic.ArraySplitByLength( b1, 4 );
参见