I write a c# console application. It may consume a large volume of memory. However, to guarantee it will not use up all my memory, I would like to set a maximum memory for it, say, 5GB. It should stop running or do some garbage collecting once it reaches the maximum memory.
The problem is, where could I set this constraint in visual studio? I guess there must be something configurable in App.config.