But I got an error "Object reference not set to an instance of an object".Code:StreamReader sr1 = new StreamReader(name1); Dictionary<string, string> dictmap = new Dictionary<string, string>(); Dictionary<int, string>[] dictped = new Dictionary<int, string>[2]; int k = 0; while (!sr1.EndOfStream) { string line = sr1.ReadLine(); string[] fields = line.Split('\t'); dictmap.Add(fields[1], line); dictped[0].Add(k, fields[1]); // error here while step into k += 1; }
Thanks for help.
Resloved!


Reply With Quote