XmlSerializationReaderShrinkArray Method |
Ensures that a given array, or a copy, is no larger than a specified length.
Namespace: System.Xml.SerializationAssembly: CSharpXamlForHtml5.System.Xml.dll (in CSharpXamlForHtml5.System.Xml.dll.dll) Version: 1.0.0.0
Syntax protected Array ShrinkArray(
Array a,
int length,
Type elementType,
bool isNullable
)
Parameters
- a
- Type: SystemArray
The array that is being checked. - length
- Type: SystemInt32
The maximum length of the array. - elementType
- Type: SystemType
The System.Type of the array's elements. - isNullable
- Type: SystemBoolean
true if null for the array, if present for the input array, can be returned;
otherwise, a new, smaller array.
Return Value
Type:
Array
The existing System.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.
See Also