System.Collections.Specialized.NameValueCollection.Remove C# (CSharp) Method

Remove() public method

public Remove ( String name ) : void
name String
return void
        public virtual void Remove(String name)
        {
            InvalidateCachedArrays();
            BaseRemove(name);
        }

Same methods

NameValueCollection::Remove ( string name ) : void

Usage Example

        public override void Initialize(string name, NameValueCollection config){
            if (String.IsNullOrEmpty(name))
                name = "WindowsTokenProvider";
            if (string.IsNullOrEmpty(config["description"])) {
                config.Remove("description");
                config.Add("description", SR.GetString(SR.RoleWindowsTokenProvider_description));
            }
            base.Initialize(name, config);

            if (config == null)
               throw new ArgumentNullException("config");
            _AppName = config["applicationName"];
            if (string.IsNullOrEmpty(_AppName))
                _AppName = SecUtility.GetDefaultAppName();

            if( _AppName.Length > 256 )
            {
                throw new ProviderException(SR.GetString(SR.Provider_application_name_too_long));
            }

            config.Remove("applicationName");
            if (config.Count > 0)
            {
                string attribUnrecognized = config.GetKey(0);
                if (!String.IsNullOrEmpty(attribUnrecognized))
                    throw new ProviderException(SR.GetString(SR.Provider_unrecognized_attribute, attribUnrecognized));
            }
        }
All Usage Examples Of System.Collections.Specialized.NameValueCollection::Remove