コード例 #1
0
        public void WriteString(string paramname, string value)
        {
            ParamItem param = Find(paramname);

            if (param == null)
            {
                Props.Add(new ParamItem(paramname, value));
            }
            else
            {
                param.Value = value;
            }
        }
コード例 #2
0
        public void WriteString(string section, string paramname, string value)
        {
            ParamItem param = GetSection(section).Find(paramname);

            if (param == null)
            {
                GetSection(section).Props.Add(new ParamItem(paramname, value));
            }
            else
            {
                param.Value = value;
            }
            _isWantSave = true;
        }
コード例 #3
0
        public string ReadString(string paramname, string defvalue)
        {
            ParamItem param = Find(paramname);

            if (param == null)
            {
                Props.Add(new ParamItem(paramname, defvalue));
                return(defvalue);
            }
            else
            {
                return(param.Value);
            }
        }
コード例 #4
0
        public string ReadString(string section, string paramname, string defvalue)
        {
            ParamItem param = GetSection(section).Find(paramname);

            if (param == null)
            {
                GetSection(section).Props.Add(new ParamItem(paramname, defvalue));
                _isWantSave = true;
                return(defvalue);
            }
            else
            {
                return(param.Value);
            }
        }