diff --git a/Src/Microsoft.Dynamic/DebugOptions.cs b/Src/Microsoft.Dynamic/DebugOptions.cs index a0c8b32c..9fee3467 100644 --- a/Src/Microsoft.Dynamic/DebugOptions.cs +++ b/Src/Microsoft.Dynamic/DebugOptions.cs @@ -19,7 +19,7 @@ internal static class DebugOptions { private static bool ReadOption(string name) { string envVar = ReadString(name); - return envVar != null && envVar.ToLowerInvariant() == "true"; + return "true".Equals(envVar, StringComparison.InvariantCultureIgnoreCase); } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "name")] diff --git a/Src/Microsoft.Dynamic/Generation/AssemblyGen.cs b/Src/Microsoft.Dynamic/Generation/AssemblyGen.cs index 694fe6f1..cc2b17d8 100644 --- a/Src/Microsoft.Dynamic/Generation/AssemblyGen.cs +++ b/Src/Microsoft.Dynamic/Generation/AssemblyGen.cs @@ -283,7 +283,8 @@ private static void CopyDirectory(string to, string from) { string toFile = Path.Combine(to, fi.Name); FileInfo toInfo = new FileInfo(toFile); - if (fi.Extension.ToLowerInvariant() == ".dll" || fi.Extension.ToLowerInvariant() == ".exe") { + if (fi.Extension.Equals(".dll", StringComparison.InvariantCultureIgnoreCase) + || fi.Extension.Equals(".exe", StringComparison.InvariantCultureIgnoreCase)) { if (!File.Exists(toFile) || toInfo.CreationTime != fi.CreationTime) { try { File.Copy(filename, toFile, true);