Array Conversions
You can convert an array type to a different array type only if they agree with these conditions:
- Equal rank
- The two arrays must have the same number of dimensions. But it is not necessary that the lengths of the related dimensions are the same.
- Reference types
- The data types of the elements of the two arrays must be reference types.
You cannot convert value-type arrays (for example
Int32
orReal64
) to a different type. See Value Types and Reference Types for more information. - Related types
- A conversion between the types of the two array elements must be possible. One type can widen or narrow to become a related type. See Widening and Narrowing Conversions for more information.
Examples
TODO