xFactorSchool.com(Beta)
How to Do Examples
Python Examples
HTML Examples
Code Examples
C Code Examples
C++ Code Examples
C# Code Examples
Java Code Examples
Python Code Examples
HTML Code Examples
CSS Code Examples
JavaScript Code Examples
Online Editor
C Code Editor
C++ Code Editor
C# Code Editor
Java Code Editor
Python Code Editor
HTML Code Editor
CSS Code Editor
JavaScript Code Editor
Practice how to create an array in C#
C# Online Editor
Execute Code
More C# Sample Code
using System; namespace ExampleApp { class Program { static void Main(string[] args) { // Creating a string array in one line using array declaration syntax string[] fruits = { "Apple", "Banana", "Cherry", "Orange", "Watermelon" }; // array of string // Accessing an array element Console.WriteLine(fruits[2]); // Output: Cherry // Creating an integer array in one line using array declaration syntax int[] numbers = { 1, 2, 3, 4, 5 }; // array of integer // Accessing an array element Console.WriteLine(numbers[2]); // Output: 3 } } }