Skip to content

The case of multi-dimensional arrays with dimension 1 #901

Closed
@kaimikael

Description

@kaimikael

There is a special case in that if one calls Array.CreateInstance(typeof(T), new int[]{num1}, new int[]{num2}) (where num1 and num2 are arbitrary integers ≠ 0), the resulting array cannot be cast to T[]. It is a multi-dimensional array of rank 1, not a one-dimensional array. It can only be used as a System.Array.
It would be nice if this was mentioned in the documentation, as one occasionally runs into that special case.


Dokumentinformation

Redigera inte det här avsnittet. Det krävs för docs.microsoft.com ➟ länkning till GitHub-problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedGood for community contributors to help [up-for-grabs]

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions