From 2ea7fbfb92a7841688d5333d3c4f49140a70c04e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnther=20Foidl?= Date: Sat, 13 Sep 2025 17:28:56 +0200 Subject: [PATCH] Made the Feature.IsSupported a read-only property --- docs/core/whats-new/dotnet-9/runtime.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/core/whats-new/dotnet-9/runtime.md b/docs/core/whats-new/dotnet-9/runtime.md index 0f3013839c87b..3d41240d4f8ed 100644 --- a/docs/core/whats-new/dotnet-9/runtime.md +++ b/docs/core/whats-new/dotnet-9/runtime.md @@ -22,7 +22,7 @@ Two new attributes make it possible to define [feature switches](https://github. public class Feature { [FeatureSwitchDefinition("Feature.IsSupported")] - internal static bool IsSupported => AppContext.TryGetSwitch("Feature.IsSupported", out bool isEnabled) ? isEnabled : true; + internal static bool IsSupported { get; } = AppContext.TryGetSwitch("Feature.IsSupported", out bool isEnabled) ? isEnabled : true; internal static void Implementation() => ...; }