About 467,000 results
Open links in new tab
  1. The array reference type - C# reference | Microsoft Learn

    Dec 14, 2024 · You can store multiple variables of the same type in an array data structure. You declare an array by specifying the type of its elements. If you want the array to store elements …

  2. C# Arrays - W3Schools

    Arrays are used to store multiple values in a single variable, instead of declaring separate variables for each value. To declare an array, define the variable type with square brackets:

  3. How do you initialize an array in C#? - Stack Overflow

    Aug 6, 2009 · Since C# 12, we can use collection expressions: // Create a jagged 2D array: int[][] twoD = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]; // Create a jagged 2D array from variables: int[] row0 = [1, …

  4. Arrays in C# - GeeksforGeeks

    Sep 9, 2025 · An array is a linear data structure that stores a fixed-size sequence of elements of the same data type in contiguous memory locations. It allows accessing elements using an …

  5. C# - int Array - Dot Net Perls

    Sep 25, 2024 · This example shows how to declare int arrays. The first 3 are declared on single lines, while the fourth array is declared by individual assignment of the elements.

  6. Essential C#: Arrays

    Oct 12, 2025 · Each item within the array is uniquely designated using an integer value called the index. The first item in a C# array is accessed using index 0. Programmers should be careful …

  7. C# Arrays (With Examples) - Programiz

    An array is a collection of similar types of data. In this tutorial, we will learn about the C# array with the help of examples.

  8. C# Array: How To Declare, Initialize And Access An Array In C#?

    Apr 1, 2025 · Learn All About C# Array in This In-depth Tutorial. It Explains How To Declare, Initialize And Access Arrays Along with Types And Examples Of Arrays in C#.

  9. C# - Arrays - Online Tutorials Library

    When you create an array, C# compiler implicitly initializes each array element to a default value depending on the array type. For example, for an int array all elements are initialized to 0. You …

  10. C# array - working with arrays in C# - ZetCode

    May 7, 2025 · Indexing in C# is zero-based, meaning the first element of the array is at index 0, the second at index 1, and so on. Arrays are reference types in C#, meaning they are stored in …