Exemple #1
0
    public static string GetString(string key, string defaultValue)
    {
        int hash = key.GetHashCode();

        Dic_Str.TryGetValue(key, out defaultValue);
        return(defaultValue);
    }
Exemple #2
0
 public static bool HasKey(string key)
 {
     //int hash = key.GetHashCode();
     if (Dic_Float.ContainsKey(key) ||
         Dic_Int.ContainsKey(key) ||
         Dic_Str.ContainsKey(key))
     {
         return(true);
     }
     return(false);
 }
Exemple #3
0
 public static void SetString(string key, string value)
 {
     //int hash = key.GetHashCode();
     if (Dic_Str.ContainsKey(key))
     {
         Dic_Str[key] = value;
     }
     else
     {
         Dic_Str.Add(key, value);
     }
 }
Exemple #4
0
 public static void DeleteKey(string key)
 {
     //int hash = key.GetHashCode();
     if (Dic_Float.ContainsKey(key))
     {
         Dic_Float.Remove(key);
     }
     if (Dic_Int.ContainsKey(key))
     {
         Dic_Int.Remove(key);
     }
     if (Dic_Str.ContainsKey(key))
     {
         Dic_Str.Remove(key);
     }
 }