Adding values to a C# array

Posted by Ross on Stack Overflow See other posts from Stack Overflow or by Ross
Published on 2008-10-14T21:02:58Z Indexed on 2010/03/27 20:53 UTC
Read the original article Hit count: 493

Filed under:
|
|

Probably a really simple one this - I'm starting out with C# and need to add values to an array, for example:

int[] terms;

for(int runs = 0; runs < 400; runs++)
{
    terms[] = value;
}

For those who have used PHP, here's what I'm trying to do in C#:

$arr = array();
for ($i = 0; $i < 10; $i++) {
    $arr[] = $i;
}

Thanks, Ross

© Stack Overflow or respective owner

Related posts about c#

Related posts about arrays