using System.Collections.Generic;
public static void Main()
const string data = "Channel.0.LineIndex=1\n\rChannel.0.LineIndex.1.Name=In\n\rChannel.0.LineIndex.1.InCount=54\n\rChannel.0.LineIndex.1.OutCount=51\n\rChannel.0.LineIndex=2\n\rChannel.0.LineIndex.2.Name=\n\rChannel.0.LineIndex.2.InCount=0\n\rChannel.0.LineIndex.2.OutCount=0";
Console.WriteLine(ds["Channel.0.LineIndex.1.Name"]);
Console.WriteLine(ds["Channel.0.LineIndex.2.InCount"]);
private static Dictionary<string, string> Parse(string data)
var dataSet = new Dictionary<string, string>();
var lines = data.Split(new char[] { '\n', '\r' }, StringSplitOptions.RemoveEmptyEntries);
foreach (var line in lines)
if (line.Split(new char[] { '.' }).Length >= 4)
var args = line.Split(new char[] { '=', });
Console.WriteLine("-> {0},{1}", args[0], args[1]);
dataSet.Add(args[0], args[1]);