コード例 #1
0
        public void SetProperty(String section, String key, String value)
        {
            PropertyFileLine line = GetProperty(section, key);

            if (line != null)
            {
                line.Value = value;
                line.UpdateRawLine();
            }
        }
コード例 #2
0
        public void AddProperty(String section, String key, String value)
        {
            AddSection(section);

            PropertyFileLine line = new PropertyFileLine();
            int insertAt          = GetNextLineIndex(section);

            line.Section  = section;
            line.Key      = key;
            line.Value    = value;
            line.Operator = @"=";
            line.UpdateRawLine();

            _lines.Insert(insertAt, line);
            AddToIndex(section, key, insertAt);
            RebuildIndexes(insertAt);
        }