You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

37 lines
778 B

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Leit.FrameWork.Cache
{
public class DictionaryHelper
{
public static void DictionaryAddValue<T>(Dictionary<string, T> dic, string key, T value)
{
key = key.Replace(" ", "");
if (dic.ContainsKey(key))
{
dic[key] = value;
}
else
{
dic.Add(key, value);
}
}
public static bool DictionaryIsConrainKey<T>(Dictionary<string, T> dic, string key)
{
if (dic.ContainsKey(key))
{
return true;
}
return false;
}
}
}