Seems like the trick wold be figuring out how to get an enumerator for the "array looking thing". Then you could just use a foreach statement to enumerate it, and load the key/value pairs into a Dictionary<TKey, TValue> or similar class.
For example, if you had a text file formatted like:
FIRSTNAME=Robert
MIDDLENAME=Herbert
LASTNAME=Moore
you could load a Dictionary with:
Code:
var nameValueList = newDictionary<string, string>();
foreach (var line inFile.ReadAllLines("ArrayLookingThing.txt")) // reads file from bin/debug
nameValueList.Add(line.Split('=')[0], line.Split('=')[1]);
Console.WriteLine(nameValueList["FIRSTNAME"]);
File.ReadAllLines returns a string array which implements IEnumerable.
Just don't know enough about the data structure you're accessing. Can you iterate over it some how? Or maybe just parse the NVP string to a text file or other format that you can invoke an enumerator on, as above.
Bob