Alex Rivera | Logout

What's the easiest way to get an OutOfMemoryException in C#?

Asked 2010-07-10T23:05:31.830
30

Just curious as to how I can get this error the easiest way.

Once I was trying to create a file navigator and I was creating Image thumbnails; that turned out awful.

Edit
Report

1 Answer

4

This does throw an OutOfMemoryException:

string s = " ";
while (true) s += s;
answered 2010-07-10T23:18:22.347

Your Answer