System.ComponentModel.Design.CommandID.ToString C# (CSharp) Method

ToString() public method

public ToString ( ) : string
return string
        public override string ToString() {
            return menuGroup.ToString() + " : " + commandID.ToString(CultureInfo.CurrentCulture);
        }
    }

Usage Example

        public override string ToString()
        {
            // MS runtime produces a NullReferenceException here if CommandID property == null
            // which I guess isn't a good idea (throwing exceptions in ToStrings???) - bug in MS??
            string commandpart = string.Empty;

            if (command != null)
            {
                commandpart = command.ToString();
            }
            commandpart = string.Concat(commandpart, " : ");
            if (this.Supported)
            {
                commandpart = string.Concat(commandpart, "Supported");
            }
            if (this.Enabled)
            {
                commandpart = string.Concat(commandpart, "|Enabled");
            }
            if (this.Visible)
            {
                commandpart = string.Concat(commandpart, "|Visible");
            }
            if (this.Checked)
            {
                commandpart = string.Concat(commandpart, "|Checked");
            }
            return(commandpart);
        }
All Usage Examples Of System.ComponentModel.Design.CommandID::ToString