N
nishi.hirve
i've created one DLL (testlib) and i want to use it in my application
as an array of its instances ...
i'm getting an exception as
'System.NullReferenceException'
plz consider the following code ..
//-------------------------------------------------------------------------------------------------------
testlib::testlibControl *tmp1 __gc[];
for(int i = 0; i < strength; i++)
{
tmp1 = new testlib::testlibControl;
tmp1->Location = System:rawing:oint(x,y); //exception
tmp1->Size = System:rawing::Size(24, 29);
x += 30;
this->Controls->Add(tmp1);
}
//-------------------------------------------------------------------------------------------------------
Why does this code cause an exception?
Thanks,
Nishi
as an array of its instances ...
i'm getting an exception as
'System.NullReferenceException'
plz consider the following code ..
//-------------------------------------------------------------------------------------------------------
testlib::testlibControl *tmp1 __gc[];
for(int i = 0; i < strength; i++)
{
tmp1 = new testlib::testlibControl;
tmp1->Location = System:rawing:oint(x,y); //exception
tmp1->Size = System:rawing::Size(24, 29);
x += 30;
this->Controls->Add(tmp1);
}
//-------------------------------------------------------------------------------------------------------
Why does this code cause an exception?
Thanks,
Nishi