About 226,000 results
Open links in new tab
  1. c# - All possible array initialization syntaxes - Stack Overflow

    What are all the array initialization syntaxes that are possible with C#? These are the current declaration and initialization methods for a simple array. Note that other techniques of …

  2. The array reference type - C# reference | Microsoft Learn

    Dec 14, 2024 · All arrays implement IList and IEnumerable. You can use the foreach statement to iterate through an array. Single-dimensional arrays also implement IList<T> and …

  3. Arrays in C# - GeeksforGeeks

    Sep 9, 2025 · Array Initialization Aarray is a reference type so the new keyword used to create an instance of the array. We can assign initialize individual array elements, with the help of the …

  4. C# - Array Initialize - Dot Net Perls

    Aug 11, 2025 · With array initializer syntax, we can specify individual elements directly. We can assign each element in an array to one value. This is often needed in programs, and the …

  5. C# Array Initialization: All Possible Syntax Options Explained with ...

    Nov 18, 2025 · This blog post explores all possible array initialization syntaxes in C#, with practical examples and explanations to help you choose the right approach for your use case.

  6. How to Initialize an Array in C#: A Complete Step-by-Step Guide

    Dec 9, 2025 · In this guide, we’ll explore all the ways to initialize arrays in C#, from basic one-dimensional arrays to complex multidimensional and jagged arrays. We’ll include step-by-step …

  7. Array Declaration and Initialization | C# Tutorial

    Sep 12, 2025 · This article walks through the forms of declaration and initialization you’ll use every day, explains the subtle differences (allocation vs initialization, literal vs runtime …

  8. C# Array Initialization: Methods and Syntax Explained

    Jul 25, 2025 · Explore various C# array initialization methods, from simple declarations to advanced techniques with collection expressions and object arrays.

  9. C# Array Tutorial: How to Declare, Initialize, Access & Use Arrays

    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. Arrays - C# language specification | Microsoft Learn

    Sep 12, 2025 · Each variable initializer is an expression or, in the case of a multi-dimensional array, a nested array initializer. The context in which an array initializer is used determines the …