SoftBasicAddArrayDataT 方法 |
一个通用的数组新增个数方法,会自动判断越界情况,越界的情况下,会自动的截断或是填充
A common array of new methods, will automatically determine the cross-border situation, in the case of cross-border, will be automatically truncated or filled
命名空间:
HslCommunication.BasicFramework
程序集:
HslCommunication (在 HslCommunication.dll 中) 版本:12.1.2.0 (12.1.2.0)
语法 public static void AddArrayData<T>(
ref T[] array,
T[] data,
int max
)
Public Shared Sub AddArrayData(Of T) (
ByRef array As T(),
data As T(),
max As Integer
)
public:
generic<typename T>
static void AddArrayData(
array<T>^% array,
array<T>^ data,
int max
)
static member AddArrayData :
array : 'T[] byref *
data : 'T[] *
max : int -> unit
参数
- array
- 类型:T
原数据 - data
- 类型:T
等待新增的数据 - max
- 类型:SystemInt32
原数据的最大值
类型参数
- T
- 数据类型
示例 int[] old = new int[5] { 1234, 1235, 1236, 1237, 1238 };
int[] tmp = new int[2] { 456, 457 };
SoftBasic.AddArrayData( ref old, tmp, 6 );
foreach(var m in old)
{
Console.Write( m + " " );
}
参见