I've got one line (so far) in my program that doesn't want to play ball...
Code:
system[mapLocation[random, random2]].AdjSystem[planetAdderLoop] = subSystemNumber;
these come from:
Code:
struct SystemStruct
{
...
private int[] adjSystems;
public int[] AdjSystems;
{
get
{
return adjSystems;
}
set
{
adjSystems = value;
}
}
...
}
Code:
SystemStruct[] system = new SystemStruct[650];
and
Code:
int subSystemNumber = new int();
Now, I've seen this at http://www.c-sharpcorner.com/UploadF...turesInCS.aspx
Code:
//C#: Property
// Author: [email protected]
using System;
class MyStruct
private int x;
public int X
{
get
{
return x;
}
set
{
x = value;
}
}
}
class MyClient
public static void Main()
{
MyStruct ms = new MyStruct();
ms.X = 10;
int xVal = ms.X;
Console.WriteLine(xVal);//Displays 10
}
}
Is it the fact I'm arraying the variable I'm trying to use here? What do I do to change that system[x].AdjSystems[y] so that 'Object reference not set to an instance of an object.' stops screaming at me?