Click or drag to resize

CommonCreateArrayT(Int32, T) Method

Creates a strongly-typed Array with an initial value parameter.

Namespace: GSF
Assembly: GSF.Core (in GSF.Core.dll) Version: 2.4.218-beta+101eee949414e414795e55a6e73d88938f0177b8
Syntax
public static T[] CreateArray<T>(
	int length,
	T initialValue
)
View Source

Parameters

length  Int32
Desired length of new array.
initialValue  T
Value used to initialize all array elements.

Type Parameters

T
Return type for new array.

Return Value

T
New array of specified type.
Remarks
It is expected that this function will only be used in Visual Basic.NET.
Example
VB
Dim elements As Integer() = CreateArray(12, -1)
Dim names As String() = CreateArray(100, "undefined")
See Also