ToString() public method

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