.NET 4.5 Now Supports Arrays Larger than 2 GB on 64-bit Platforms

The 2 GB limitation on arrays has been one of the most frustrating experiences  I have had on the .NET Framework. Because the 64-bit support on the .NET Framework cannot exceed 2GB. This limitation was a big problem for those of us who were trying to work with large matrices. No matter the amount of RAM we have, we still get a System.OutOfMemoryException.
 
System.OutOfMemoryException was unhandled
HResult=-2147024882
Message=Exception of type 'System.OutOfMemoryException' was thrown.
Source=Console64BitArrays

.NET 4.5 has finally come out with a solution for this. .NET Framework 4.5 has introduced a configuration attribute in the run-time schema that supports arrays larger than 2 GB in the total size on the 64-bit applications. All you need to do is enable the gcAllowVeryLargeObjects element that controls the behavior of the .NET garbage-collection system. Here's the procedure:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
<runtime>
<gcAllowVeryLargeObjects enabled="true" />
</runtime>
</configuration