At 20:08:25, 27.04.2004, Krish wrote:
I have Type System.Object and the value is {System.Array}
I see [0].......[100] in the watch window.
How do I traverse such a data structure.
thanks for any help.
You'll have to know the type of the base element. If it is object:
foreach(object obj in myArray)
{
// use obj
}
An alternative, using random access (indexing):
for (int i = 0; i < myArray.Length; i++)
{
// use myArray[i]
}
--
Rudy Velthuis
"If the automobile had followed the same development cycle as the
computer, a Rolls-Royce would today cost $100, get a million miles
per gallon, and explode once a year, killing everyone inside."
-- Robert X. Cringely.