BetterMembership.Extensions.NameValueCollectionExtension.ContainsKey C# (CSharp) Method

ContainsKey() public static method

public static ContainsKey ( this collection, string key ) : bool
collection this
key string
return bool
        public static bool ContainsKey(this NameValueCollection collection, string key)
        {
            if (collection == null)
            {
                return false;
            }

            if (collection.Get(key) == null)
            {
                return collection.AllKeys.Contains(key);
            }

            return true;
        }