GCSettings Class


The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Specifies the garbage collection settings for the current process.

Namespace:   System.Runtime
Assembly:  mscorlib (in mscorlib.dll)


public static class GCSettings


Gets a value that indicates whether server garbage collection is enabled.


[Supported in the .NET Framework 4.5.1 and later versions]

Gets or sets a value that indicates whether a full blocking garbage collection compacts the large object heap (LOH).


Gets or sets the current latency mode for garbage collection.

Use the IsServerGC property to determine whether server garbage collection is enabled for the current process.

Universal Windows Platform
Available since 8
.NET Framework
Available since 2.0
Portable Class Library
Supported in: portable .NET platforms
Windows Phone Silverlight
Available since 8.0
Windows Phone
Available since 8.1

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top