I have an Class structure like this:
class A {
Dictionary<UInt64, B> listB;
method1(){}
methodN(){}
}
class B {
Dictionary<UInt32, C> listC;
Dictionary<UInt32, E> listE;
List<F> listF;
method1(){}
methodN(){}
}
class C {
Dictionary<UInt32, D> listD;
method1(){}
methodN(){}
}
class D {
method1(){}
methodN(){}
}
class E {
method1(){}
methodN(){}
}
class F {
method1(){}
methodN(){}
}
Class A is the main Class, and B is a sub class of A. All other classes are sub class of B.
I want to serialize class A with all sub Classes.
How can I serialize these Objects?
Thank You!
since you said you want to do it over sockets, probably something like this:
edit: note: code is untested. it probably needs some modifications depending on your stream and such
And like Brad commented, give all your classes the SerializableAttribute.