Use the following app.config to enable server GC.

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

Use System.Environment.IsServerGC to check if server GC is turned on or not.