System.Xml.Serialization.XmlSerializationReader.ShrinkArray Method

Ensures that a given array, or a copy, is no larger than a specified length.

Syntax

protected Array ShrinkArray (Array a, int length, Type elementType, bool isNullable)

Parameters

a
The array that is being checked.
length
The maximum length of the array.
elementType
The Type of the array's elements.
isNullable
true if null for the array, if present for the input array, can be returned; otherwise, a new, smaller array.

Returns

The existing Array, if it is already small enough; otherwise, a new, smaller array that contains the original array's elements up to the size of length.

Remarks

The protected members of System.Xml.Serialization.XmlSerializationReader are intended for use only by derived classes that are used internally within the .NET Framework XML serialization infrastructure.

Requirements

Namespace: System.Xml.Serialization
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0