Another solution might be to create an explicit new thread to perform operations in which you receive an error
Thread t = new Thread(Run, 4194304); // 4M of stack size t.Start(); t.Join(); if (loadException != null) throw loadException; void Run() { try { // Operation causing stack overflow } catch (Exception e) { ... } }
Hi
Massimo
source share