When a .NET application is running it registers and updates a large number of performance counters which you can use to monitor the way your application is running - for example, how many threads it is using, what its memory usage is, how long it spends doing garbage collection and so on.

You can read these properties using the .NET framework built in PerformaceCounter class. The attached code does just that and presents the results in a graphical format which you can have open and watching as you test your application - as this can show up performance issues before the users get to see the problems.