T
Tony
Hi, the following code cause a StackOverflowException. Can someone tell me
why?
Thanks
Tony
///////////////////////////////////////////////////////////////////
using System;
namespace UnsafeArrayTest
{
class Class1
{
unsafe static void Main(string[] args)
{
int size = 999999;
int *pArray = stackalloc int [size]; // << StackOverflowException
for ( int i = 0; i < size; i++ )
pArray = i;
}
}
}
why?
Thanks
Tony
///////////////////////////////////////////////////////////////////
using System;
namespace UnsafeArrayTest
{
class Class1
{
unsafe static void Main(string[] args)
{
int size = 999999;
int *pArray = stackalloc int [size]; // << StackOverflowException
for ( int i = 0; i < size; i++ )
pArray = i;
}
}
}