F
Fernando Casero
Hi, I'm programming on Visual C# Express Beta 2 and I have the following
code:
class MyClass
{
int[] a = new int[30]
int [,] b = new int[10,20]
public int SomeMethod()
}
class OtherClass
{
MyClass[] cls = null;
public void DoSomething()
{
int a = 3000;
cls = new MyClass[a];
}
}
class program
{
OtherClass other = new OtherClass();
public int main()
{
other.DoSomething()
}
}
When running on Debug , this code works as expected, but on Release I get an
OutOfMemoryException allocatting the array on "cls = new MyClass[a]" when
calling "DoSomething"
Can someone help me to solve it?
Thanks in advance
Fernando
code:
class MyClass
{
int[] a = new int[30]
int [,] b = new int[10,20]
public int SomeMethod()
}
class OtherClass
{
MyClass[] cls = null;
public void DoSomething()
{
int a = 3000;
cls = new MyClass[a];
}
}
class program
{
OtherClass other = new OtherClass();
public int main()
{
other.DoSomething()
}
}
When running on Debug , this code works as expected, but on Release I get an
OutOfMemoryException allocatting the array on "cls = new MyClass[a]" when
calling "DoSomething"
Can someone help me to solve it?
Thanks in advance
Fernando