System.ComponentModel.Component.ToString C# (CSharp) Method

ToString() public method

public ToString ( ) : string
return string
        public override string ToString() { throw null; }
    }

Usage Example

 private void SwitchControl(Component obj)
 {
     if (obj != null)
     {
         if (propertyGrid.SelectedObject != obj)
         {
             Text = obj.ToString();
             propertyGrid.SelectedObject = obj;
             propertyGrid.PropertySort = PropertySort.Alphabetical;
         }
     }
 }