mscorlib 2.0.0.0 4.0.0.0 System.Object

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

Specifies the garbage collection settings for the current process.

- Property
  2.0.0.0
  4.0.0.0
  System.Boolean To be added.

  For information about server garbage collection, see the "Workstation and Server Garbage Collection" section in Fundamentals of Garbage Collection.

  If server garbage collection is not enabled, workstation garbage collection is in effect (with or without concurrent collection). Server garbage collection is available only on multiprocessor computers.

  An unmanaged host can request server garbage collection, and the host request overrides configuration file settings. If the host does not specify the type of garbage collection, you can use a configuration file setting to specify server garbage collection. This setting is valid only in the application configuration file, not in the machine configuration file (see Configuration Files). The following example shows the contents of a sample application configuration file that enables server garbage collection.

  `<configuration> <runtime> <gcServer enabled="true" /> </runtime> </configuration>`

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

- Property
  2.0.0.0
  4.0.0.0
  get: System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)
  set: System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)
  System.Runtime.GCLatencyMode To be added.

  You can reduce the level of intrusiveness of garbage collection in your application by setting the to during critical operations. After such operations are completed, return to a higher latency mode so that more objects can be reclaimed to increase memory.

  See Latency Modes for a discussion of how the runtime configuration settings for garbage collection affect the default value of the enumeration.

  Gets or sets the current latency mode for garbage collection.