|
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.230-beta+03417d7b5cff037b24e882d7adef82d359b34964
Syntaxpublic 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.
ExampleDim elements As Integer() = CreateArray(12, -1)
Dim names As String() = CreateArray(100, "undefined")
See Also