Closed
Description
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.
- ID: 47a7c475-ad0c-552e-03a9-e280c69ea5a7
- Version Independent ID: 690c45ff-c8b0-bcaf-9094-a7edee524d71
- Content: Array.CreateInstance Method (System)
- Content Source: xml/System/Array.xml
- Product: dotnet-api
- GitHub Login: @dotnet-bot
- Microsoft Alias: dotnetcontent