|
CommonCreateArrayT(Int32, T) Method
|
Creates a strongly-typed Array with an initial value parameter.
Namespace: GSFAssembly: GSF.Core (in GSF.Core.dll) Version: 2.4.205-beta+5ef4169f3b1079d8b163dd363614f656bd140924
Syntax public static T[] CreateArray<T>(
int length,
T initialValue
)
Public Shared Function CreateArray(Of T) (
length As Integer,
initialValue As T
) As T()
public:
generic<typename T>
static array<T>^ CreateArray(
int length,
T initialValue
)
static member CreateArray :
length : int *
initialValue : 'T -> 'T[]
JavaScript does not support generic types or methods.
View SourceParameters
- 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
TNew array of specified type.
Remarks
It is expected that this function will only be used in Visual Basic.NET.
Example Dim elements As Integer() = CreateArray(12, -1)
Dim names As String() = CreateArray(100, "undefined")
See Also