Repository: godotengine/godot
File: modules/mono/editor/GodotTools/GodotTools/GodotSharpEditor.cs (C#)

Code before:
                        GD.PrintErr(e.ToString());
                    GD.PushError($".NET Sdk not found. The required version is '{dotNetSdkSearchVersion}'.");
                }
            }

            var editorBaseControl = EditorInterface.Singleton.GetBaseControl();

            _editorSettings = EditorInterface.Singleton.GetEditorSettings();

            _errorDialog = new AcceptDialog();
            _errorDialog.SetUnparentWhenInvisible(true);

            _confirmCreateSlnDialog = new ConfirmationDialog();
            _confirmCreateSlnDialog.SetUnparentWhenInvisible(true);
            _confirmCreateSlnDialog.Confirmed += () => CreateProjectSolution();

            MSBuildPanel = new MSBuildPanel();
            MSBuildPanel.BuildStateChanged += BuildStateChanged;
            _bottomPanelBtn = AddControlToBottomPanel(MSBuildPanel, "MSBuild".TTR());

            AddChild(new HotReloadAssemblyWatcher { Name = "HotReloadAssemblyWatcher" });

            _menuPopup = new PopupMenu();
            _menuPopup.Hide();

            AddToolSubmenuItem("C#", _menuPopup);

            _toolBarBuildButton = new Button
            {
                Flat = true,
                Icon = EditorInterface.Singleton.GetEditorTheme().GetIcon("BuildCSharp", "EditorIcons"),
                FocusMode = Control.FocusModeEnum.None,
                Shortcut = EditorDefShortcut("mono/build_solution", "Build Project".TTR(), (Key)KeyModifierMask.MaskAlt | Key.B),
                ShortcutInTooltip = true,
            };
            EditorShortcutOverride("mono/build_solution", "macos", (Key)KeyModifierMask.MaskMeta | (Key)KeyModifierMask.MaskCtrl | Key.B);

            _toolBarBuildButton.Pressed += BuildProjectPressed;
            Internal.EditorPlugin_AddControlToEditorRunBar(_toolBarBuildButton);
            // Move Build button so it appears to the left of the Play button.
            _toolBarBuildButton.GetParent().MoveChild(_toolBarBuildButton, 0);

            if (File.Exists(GodotSharpDirs.ProjectCsProjPath))
            {
                ApplyNecessaryChangesToSolution();
            }
            else
            {
                _bottomPanelBtn.Hide();
                _toolBarBuildButton.Hide();
            }

Review comment (suggestion):
I don't know what's the preferred style but I notice the `AddChild` function above does this inline:
```suggestion
            _menuPopup = new PopupMenu { Name = "CSharpTools" };
```

Code after:
                        GD.PrintErr(e.ToString());
                    GD.PushError($".NET Sdk not found. The required version is '{dotNetSdkSearchVersion}'.");
                }
            }

            var editorBaseControl = EditorInterface.Singleton.GetBaseControl();

            _editorSettings = EditorInterface.Singleton.GetEditorSettings();

            _errorDialog = new AcceptDialog();
            _errorDialog.SetUnparentWhenInvisible(true);

            _confirmCreateSlnDialog = new ConfirmationDialog();
            _confirmCreateSlnDialog.SetUnparentWhenInvisible(true);
            _confirmCreateSlnDialog.Confirmed += () => CreateProjectSolution();

            MSBuildPanel = new MSBuildPanel();
            MSBuildPanel.BuildStateChanged += BuildStateChanged;
            _bottomPanelBtn = AddControlToBottomPanel(MSBuildPanel, "MSBuild".TTR());

            AddChild(new HotReloadAssemblyWatcher { Name = "HotReloadAssemblyWatcher" });

            _menuPopup = new PopupMenu
            {
                Name = "CSharpTools",
            };
            _menuPopup.Hide();

            AddToolSubmenuItem("C#", _menuPopup);

            _toolBarBuildButton = new Button
            {
                Flat = true,
                Icon = EditorInterface.Singleton.GetEditorTheme().GetIcon("BuildCSharp", "EditorIcons"),
                FocusMode = Control.FocusModeEnum.None,
                Shortcut = EditorDefShortcut("mono/build_solution", "Build Project".TTR(), (Key)KeyModifierMask.MaskAlt | Key.B),
                ShortcutInTooltip = true,
            };
            EditorShortcutOverride("mono/build_solution", "macos", (Key)KeyModifierMask.MaskMeta | (Key)KeyModifierMask.MaskCtrl | Key.B);

            _toolBarBuildButton.Pressed += BuildProjectPressed;
            Internal.EditorPlugin_AddControlToEditorRunBar(_toolBarBuildButton);
            // Move Build button so it appears to the left of the Play button.
            _toolBarBuildButton.GetParent().MoveChild(_toolBarBuildButton, 0);

            if (File.Exists(GodotSharpDirs.ProjectCsProjPath))
            {
                ApplyNecessaryChangesToSolution();
            }
            else
            {