Share via


SZArrayRecord<T>.GetArray(Boolean) Method

Definition

When overridden in a derived class, allocates an array of T and fills it with the data provided in the serialized records (in case of primitive types like String or Int32) or the serialized records themselves.

public abstract T?[] GetArray(bool allowNulls = true);
override this.GetArray : bool -> 'T[]
Public MustOverride Function GetArray (Optional allowNulls As Boolean = true) As T()

Parameters

allowNulls
Boolean

true to permit null values within the array; otherwise, false.

Returns

T[]

An array filled with the data provided in the serialized records.

Remarks

Before calling this method, check the total length of the array by using the Length property. An attacker could have sent you a small payload that requires allocation of a very large array that could cause OutOfMemoryException and denial of service.

Applies to