|
-
Jun 28th, 2006, 07:46 AM
#1
Thread Starter
Hyperactive Member
[2.0] array question
I have elements in a 2 dimensional array.
Code:
string[,] ParamsValues = { {"1Month", "1 Month"},
{"2Months", "2 Months" },
{ "3Months", "3 Months"}};
I would like to go thru the array and assign ParamsValues[0,1] to ParamsValues[0,0] so on and so forth.
How can I do this ?
I tried something like this and it didn't work.
Code:
for (int i = 0; i < ParamsValues.GetLength(0); i++)
{
for (int j = 0; j < ParamsValues.GetLength(1); j++)
{
k = ParamsValues[i, j];
string l = ParamsValues[i, j];
}
//Console.WriteLine(k);
}
thanks
nath
-
Jun 28th, 2006, 09:50 AM
#2
Re: [2.0] array question
Code:
string[,] ParamsValues = { {"1Month", "1 Month"},{"2Months", "2 Months" },{ "3Months", "3 Months"}};
for (int i = 0; i < ParamsValues.Length; i++)
{
for (int j = 0; j < ParamsValues[i].Length; j++)
{
k = ParamsValues[i, j];
string l = ParamsValues[i, j];
}
//Console.WriteLine(k);
}
"I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
My Blog
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|