• stevium
    Open
  • blog
  • |
  • projects
  • |
  • wiki
  • |
  • tags
  • |
  • search

Jagged arrays in C#Edit

8/15/2023

A jagged array is an array whose elements are arrays, possibly of different sizes.

int[][] jaggedArray = new int[3][];
jaggedArray[0] = new int[5];
...
jaggedArray[0] = new int[] { 1, 3, 4, 5, 9 };
...
int [][] jaggedArray2 = new int [][] {
    new int [] { 1, 3, 5, 7, 9 },
    ...
}

See also

  • https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/arrays/jagged-arrays
  • development
  • wiki
  • c#
Sitemap
  • Blog
  • Projects
  • Wiki
  • Tags
  • Search
Elsewhere
  • GitHub
  • LinkedIn
  • Twitter
  • Facebook
  • Instagram
Credits

Made with ♡ using React, and the help of Git, Redis and Spacemacs.

Inspired by Masochist.