diff --git a/src/System.Management.Automation/engine/ExperimentalFeature/ExperimentalFeature.cs b/src/System.Management.Automation/engine/ExperimentalFeature/ExperimentalFeature.cs index ef2f6a7bd4..776768339e 100644 --- a/src/System.Management.Automation/engine/ExperimentalFeature/ExperimentalFeature.cs +++ b/src/System.Management.Automation/engine/ExperimentalFeature/ExperimentalFeature.cs @@ -86,7 +86,7 @@ namespace System.Management.Automation new ExperimentalFeature(name: "PSFileSystemProviderV2", description: "Replace the old FileSystemProvider with cleaner design and faster code", source: EngineSource, - isEnabled: false)), + isEnabled: false), */ }; EngineExperimentalFeatures = new ReadOnlyCollection(engineFeatures); diff --git a/src/System.Management.Automation/engine/ExperimentalFeature/GetExperimentalFeatureCommand.cs b/src/System.Management.Automation/engine/ExperimentalFeature/GetExperimentalFeatureCommand.cs index a6cc9e7d7c..7affc3f118 100644 --- a/src/System.Management.Automation/engine/ExperimentalFeature/GetExperimentalFeatureCommand.cs +++ b/src/System.Management.Automation/engine/ExperimentalFeature/GetExperimentalFeatureCommand.cs @@ -58,15 +58,13 @@ namespace Microsoft.PowerShell.Commands /// /// /// Engine features come before module features. - /// Within engine features and more features, features are ordered by name. + /// Within engine features and module features, features are ordered by name. /// - private static string GetSortingString(ExperimentalFeature feature) + private static (int, string) GetSortingString(ExperimentalFeature feature) { - if (ExperimentalFeature.EngineSource.Equals(feature.Source)) - { - return "0:" + feature.Name; - } - return "1:" + feature.Name; + return ExperimentalFeature.EngineSource.Equals(feature.Source, StringComparison.OrdinalIgnoreCase) + ? (0, feature.Name) + : (1, feature.Name); } ///