T
Tinus
Hello,
I'm trying to call a public function located in a different class, but get
an error message:
Object reference not set to an instance of an object.
I've got 2 classes: clsMain and clsData. In clsData I've a filled (private
or public) DataTable. When I instantiate clsData in clsMain and then call
from clsMain a public function that counts the number of rows in the
DataTable I get the above mentioned error. However, when I call the same
function from clsData itself then the count works....
What am I doing wrong?
Can someone help me with this?
Thanks in advance,
Tinus
I'm trying to call a public function located in a different class, but get
an error message:
Object reference not set to an instance of an object.
I've got 2 classes: clsMain and clsData. In clsData I've a filled (private
or public) DataTable. When I instantiate clsData in clsMain and then call
from clsMain a public function that counts the number of rows in the
DataTable I get the above mentioned error. However, when I call the same
function from clsData itself then the count works....
What am I doing wrong?
Can someone help me with this?
Thanks in advance,
Tinus