A
andrewcw
Seems it should be simple. I had problems with a larger
class and the newsgroup suggested something I also tried.
So I pruned my class to see if I could find out what could
be wrong, Still dont know. This snippet is easily dropped
into any project, THANKS
namespace QCLoader
{
public class disksetitem
{
public string model;
}
public class mytestrecord
{
public disksetitem[] disksetitem;
}
}
/// test :
try
{
QCLoader.mytestrecord rec = new QCLoader.mytestrecord();
rec.disksetitem[0] = new QCLoader.disksetitem(); //CRASH
rec.disksetitem[0].model="foobar";
}
catch ( Exception e)
{
Console.WriteLine(e.Message);
}
class and the newsgroup suggested something I also tried.
So I pruned my class to see if I could find out what could
be wrong, Still dont know. This snippet is easily dropped
into any project, THANKS
namespace QCLoader
{
public class disksetitem
{
public string model;
}
public class mytestrecord
{
public disksetitem[] disksetitem;
}
}
/// test :
try
{
QCLoader.mytestrecord rec = new QCLoader.mytestrecord();
rec.disksetitem[0] = new QCLoader.disksetitem(); //CRASH
rec.disksetitem[0].model="foobar";
}
catch ( Exception e)
{
Console.WriteLine(e.Message);
}