Jul 20, 2010

Determine how big an array can be allocated.

long FreeBytes = New System.Diagnostics.PerformanceCounter("Memory", "Available Bytes").NextValue();

This means that you can allocate new byte[FreeBytes];