コード例 #1
0
 public void AddProperty(string key, string value)
 {
     if (Propertites.ContainsKey(key))
     {
         Propertites.Remove(key);
     }
     Propertites.Add(key, value);
 }
コード例 #2
0
        public string GetProperty(string key, string defaultValue)
        {
            var result = "";

            if (Propertites.ContainsKey(key))
            {
                if (Propertites.TryGetValue(key, out result))
                {
                    return(result);
                }
            }
            return(defaultValue);
        }