T
tcomer
This is what I'm trying to do:
class MyClass
{
private MyObject [] object;
public MyClass()
{
object = new MyObject[10];
MyFunction(ref object);
....
protected MyFunction(ref MyObject [] object)
{
object[0].myVar= "value";
....
this is giving me a NullReferenceException on the statement in
MyFunction. The constructor of the object initializes all variables to
a default value.
class MyClass
{
private MyObject [] object;
public MyClass()
{
object = new MyObject[10];
MyFunction(ref object);
....
protected MyFunction(ref MyObject [] object)
{
object[0].myVar= "value";
....
this is giving me a NullReferenceException on the statement in
MyFunction. The constructor of the object initializes all variables to
a default value.