How can I find current thread's maximum stack size?
I am getting a stack overflow exception while executing a function from MMC UI but not from Powershell (command-line/console). So I am kind of guessing its something to do with the default stack size allocated in UI thread to that of in Powershell (command line/console).
So how to find current thread's maximum stack size?
I know ideally one doesn't need to know these or set these, but looks like its related to stack size as it works from console/Powershell(command-line app) not from UI.
The below thread is kind of related, but it doesn't answer my question; it probably gives some guidelines:
Maximum Thread Stack Size .NET?
To get more details about the actual problem: