P
Peter Webb
Its been working fine for ages, I spend a couple of days on unrelated parts
of the system, and I can no longer write files (or read old ones).
The error message I get is "There was an error reflecting type
WindowsApplication1.Form1.savestructure'.".
Here is the code, which has worked fine for ages:
public class savestructure
{
public List<textaslot> alist;
public int speed, size;
public int squareorcircle;
}
(textaslot is an awful class, with lots of public members. However, I
haven't added very much into it in the last few days, and taking what I have
doesn't seem to help, although it was a lot of work to try. Nor can I
understand why this would fail on write, so its not a compatibility issue.)
..
..
private void savethisconfig()
{
savestructure thissave = new savestructure();
thissave.alist = slotcollection;
thissave.speed = (int)speedUpDown.Value;
thissave.squareorcircle = mainrotatortype;
thissave.size = (int)sizeUpDown.Value;
serialiseandsave(thissave);
}
public void serialiseandsave(savestructure allslots)
{
XmlSerializer mySerializer = new
XmlSerializer(typeof(savestructure));
... and that's where it crashes.
This is really spooking me, as it also means I can't load any of the dozens
of files I have created. I have no idea where to go after getting this
error - what to try.
Any suggestions?
of the system, and I can no longer write files (or read old ones).
The error message I get is "There was an error reflecting type
WindowsApplication1.Form1.savestructure'.".
Here is the code, which has worked fine for ages:
public class savestructure
{
public List<textaslot> alist;
public int speed, size;
public int squareorcircle;
}
(textaslot is an awful class, with lots of public members. However, I
haven't added very much into it in the last few days, and taking what I have
doesn't seem to help, although it was a lot of work to try. Nor can I
understand why this would fail on write, so its not a compatibility issue.)
..
..
private void savethisconfig()
{
savestructure thissave = new savestructure();
thissave.alist = slotcollection;
thissave.speed = (int)speedUpDown.Value;
thissave.squareorcircle = mainrotatortype;
thissave.size = (int)sizeUpDown.Value;
serialiseandsave(thissave);
}
public void serialiseandsave(savestructure allslots)
{
XmlSerializer mySerializer = new
XmlSerializer(typeof(savestructure));
... and that's where it crashes.
This is really spooking me, as it also means I can't load any of the dozens
of files I have created. I have no idea where to go after getting this
error - what to try.
Any suggestions?