I've this custom class:
public class MyClass
{
private byte byteValue;
private int intValue;
private MyClass myClass1= null;
private MyClass myClass2 = null;
}
obviously I also have constructor and get/set methods.
In my main form I initialize a lot of MyClass
object (note that in MyClass
object I have reference to other 2 MyClass objects). After initialization I iterate through a first MyClass
item, call it for instance "root". So, for example I do something like:
MyClass myClassTest = root.getMyClass1();
MyClass myClassTest2 = myClassTest.getMyClass1();
and so on.
No I want to store in a binary file, all the MyClass
object instantiated, in order to get them again after software restart.
I have totally no idea on how to do this, can someone please help me?
Thanks.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…