System.Diagnostics.Switch.Switch C# (CSharp) Method

Switch() protected method

protected Switch ( string displayName, string description, string defaultSwitchValue ) : System
displayName string
description string
defaultSwitchValue string
return System
        protected Switch(string displayName, string description, string defaultSwitchValue)
        {
            // displayName is used as a hashtable key, so it can never
            // be null.
            if (displayName == null) displayName = string.Empty;

            _displayName = displayName;
            _description = description;

            // Add a weakreference to this switch and cleanup invalid references
            lock (s_switches)
            {
                _pruneCachedSwitches();
                s_switches.Add(new WeakReference(this));
            }

            _defaultValue = defaultSwitchValue;
        }

Same methods

Switch::Switch ( string displayName, string description )
Switch::Switch ( string displayName, string description, string defaultSwitchValue )
Switch::Switch ( string displayName, string description ) : System