From 73ec2f9af5b7f9c08ba05aa7212d2f232c3f7698 Mon Sep 17 00:00:00 2001 From: Lachlan Ennis <2433737+elachlan@users.noreply.github.com> Date: Fri, 4 Nov 2022 11:46:14 +1000 Subject: [PATCH] Fix build errors --- .../src/System/Windows/Forms/Application.cs | 6 +----- .../src/System/Windows/Forms/Control.cs | 1 - 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/System.Windows.Forms/src/System/Windows/Forms/Application.cs b/src/System.Windows.Forms/src/System/Windows/Forms/Application.cs index d77aee4d25d..8782f369518 100644 --- a/src/System.Windows.Forms/src/System/Windows/Forms/Application.cs +++ b/src/System.Windows.Forms/src/System/Windows/Forms/Application.cs @@ -292,11 +292,7 @@ public static string ExecutablePath { get { - if (s_executablePath is null) - { - s_executablePath = Path.GetFullPath(PInvoke.GetModuleFileNameLongPath(default)); - } - + s_executablePath ??= Path.GetFullPath(PInvoke.GetModuleFileNameLongPath(default)); return s_executablePath; } } diff --git a/src/System.Windows.Forms/src/System/Windows/Forms/Control.cs b/src/System.Windows.Forms/src/System/Windows/Forms/Control.cs index 741ebf7ab07..3963f522a47 100644 --- a/src/System.Windows.Forms/src/System/Windows/Forms/Control.cs +++ b/src/System.Windows.Forms/src/System/Windows/Forms/Control.cs @@ -12,7 +12,6 @@ using System.Runtime.ExceptionServices; using System.Runtime.InteropServices; using System.Runtime.InteropServices.ComTypes; -using System.Text; using System.Windows.Forms.Automation; using System.Windows.Forms.Layout; using Microsoft.Win32;