stop unity editor playing

C#
 //C# public static class AppHelper
{     
  #if UNITY_WEBPLAYER     
    public static string webplayerQuitURL = "http://google.com";
  #endif     
    
  public static void Quit()     
  {         
    #if UNITY_EDITOR         
      UnityEditor.EditorApplication.isPlaying = false;                
    #endif     
    } 
}
Source

Also in C#: