A bug in System.Exception

try the following code and you’ll get an error.
It depends on how much memory you’ve got ,my current machine has 512mb so 2000000 bytes was way above the limit.

StringBuilder sb = new StringBuilder();

for (int i = 0 ; i<20000;i++)

throw new Exception(sb.ToString());


*thnx to hadar rosen for the telling me about this.

Comments (1)

  1. Rozner Lior says:

    Nice to know