public static INIKey FromLine(string Line) { INIKey ret = new INIKey(); ret.Key = Line.Split('=')[0]; ret.Value = Line.Remove(0, ret.Key.Length + 1); return(ret); }
public void LoadFile(string File) { if (System.IO.File.Exists(File)) { string[] Lines = System.IO.File.ReadAllLines(File); foreach (string Line in Lines) { if (!Line.StartsWith("#") && !Line.StartsWith(";") && Line.Contains("=")) { Assets.Add(INIKey.FromLine(Line)); } else { Assets.Add(new INIEntity() { Content = Line }); } } } }