I'm trying to save the state of an array so I can load it later in it's initial state. But I don't know how to make them separate instances, and not to reference each other. Here's some sample code:
static void Main(string[] args)
{
int[,] first = new int[5, 5];
int[,] second = first;
for (int i = 0; i < 5; i++)
{
for (int j = 0; j < 5; j++)
{
first[i, j] = i * j;
}
}
first[0, 0] = 10000;
first = second;
Console.WriteLine(first[0, 0]); //10000
}