Array in C#



Array in C# 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MYPROJECT.startup
{


        class startupday1

        {

        static void Main()

        {
            int[] arr = new int[4];
            arr[0] = 1;
            arr[1] = 21;
            arr[2] = 31;
            arr[3] = 43;
            Console.Write("\n"+arr[0]);
            Console.Write("\n"+arr[1]);
            Console.Write("\n"+arr[2]);
            Console.Write("\n"+arr[3]);
            Console.ReadLine();
        }

 }

 }

OUTPUT



Comments

Popular posts from this blog

Input and output in C#

Printing Hello World in C#

Passing value without reference in C#