Skip to content

Commit 2ea7fbf

Browse files
authored
Made the Feature.IsSupported a read-only property
1 parent 7f37578 commit 2ea7fbf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/core/whats-new/dotnet-9/runtime.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Two new attributes make it possible to define [feature switches](https://github.
2222
public class Feature
2323
{
2424
[FeatureSwitchDefinition("Feature.IsSupported")]
25-
internal static bool IsSupported => AppContext.TryGetSwitch("Feature.IsSupported", out bool isEnabled) ? isEnabled : true;
25+
internal static bool IsSupported { get; } = AppContext.TryGetSwitch("Feature.IsSupported", out bool isEnabled) ? isEnabled : true;
2626

2727
internal static void Implementation() => ...;
2828
}

0 commit comments

Comments
 (0)