using System.Collections;
using System.Collections.Generic;
public static void Main()
Console.WriteLine("Hello World");
string config1 = @"{""MyKey"" : ""MyValue""}";
string config2 = @"{ ""Mykey"" : ""MyValue"", ""YourKey"" : ""YourValue"" }";
public static void ParseScript(string s)
Dictionary<string, object> dic = new Dictionary<string, object>();
KeyValuePair<string, object> pair = ParseSubscript(s, ref i);
dic.Add(pair.Key, pair.Value);
Console.WriteLine(p.Key + " = " + p.Value);
public static KeyValuePair<string, object> ParseSubscript(string s, ref int i)
strKey = ParseString(s, ref i);
Console.WriteLine("Error in script");
strValue = ParseString(s, ref i);
return new KeyValuePair<string, object>(strKey, strValue);
public static string ParseString(string s, ref int i)
str = s.Substring(strStart, strEnd - strStart);
Log(strStart, strEnd, str);
public static void Log(int pos, string str)
Console.WriteLine("[ Found '" + str + "' at index: " + pos + " ]");
public static void Log(int startPos, int endPos, string str)
Console.WriteLine("[ Found '" + str + "' between indices: " + startPos + " and " + endPos + " ]");