dotnet / dotnet/dotnet-api-docs

What does it mean "NoGCRegion is a read-only value"?

Open
#10,390 6 comments 0 reactions 0 assignees View on GitHub
area-System.Runtime Pri3 untriaged
Dominant language
C#
Stars
949
Forks
1.7k
Avg merge
3d 27m
Merged PRs (30d)
49

Description

### Type of issue

Typo

### Description

From https://learn.microsoft.com/en-us/dotnet/api/system.runtime.gclatencymode?view=net-8.0#fields

![NoGCRegion](https://github.com/user-attachments/assets/54bdee2b-f8eb-44b9-bfb6-f7ddfbc2b970)

Brief look at `enum` itself reveals that `NoGCRegion` is declared same as other values,, https://source.dot.net/#System.Private.CoreLib/src/libraries/System.Private.CoreLib/src/System/Runtime/GCSettings.cs,9dba3e06a9881afd.

`LatencyMode` property is what validates its inputs, https://source.dot.net/#System.Private.CoreLib/src/libraries/System.Private.CoreLib/src/System/Runtime/GCSettings.cs,44.

![Throw](https://github.com/user-attachments/assets/f2f5a818-f773-4ed4-ac1f-17045feedc28)

### Page URL

https://learn.microsoft.com/en-us/dotnet/api/system.runtime.gclatencymode?view=net-8.0#system-runtime-gclatencymode-nogcregion

### Content source URL

https://github.com/dotnet/dotnet-api-docs/blob/main/xml/System.Runtime/GCLatencyMode.xml

### Document Version Independent Id

0bc21af3-3d1b-eea7-9f2f-9a0cf3045dee

### Article author

@dotnet-bot

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.