Earn income with your C# skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest self-service freelancing marketplace for people like you.

How to add values to an array in C#

Below are two ways to assign values to an array:


// using array initializer

int[] terms = { 1, 2, 3, 4, 5, 6, 7 };


// using a for loop

int[] terms = new int[400];
for (int i = 0; i < terms.count(); i++)
{
   terms[i] = value;
}



Stay Inspired!
Join other developers and designers who have already signed up for our mailing list.
Terms     Privacy     Licensing       EULA       Sitemap      
© Data & Object Factory, LLC.
Made with    in Austin, Texas.      Vsn 1.3.0