I want to obtain the current number of window handles and the system-wide window handle limit in C#. How do I go about this?
As Raymond Chen put it some time ago, if you're thinking about window handle limits, you're probably doing something wrong :)
Anyway, I bet there's no special C# way to do it, because it's very system-specific. You can use the same functions that you would use in a C++ application. Call the functions using P/Invoke. To learn how to write the imports, go to pinvoke.net.
Edit: As I understand your question, I assume you already know how to do that in a Win32 application.