G'Day,
Being not content with default object serialization I have a class
which implements ISerializable so as I can controll how I write data to
the stream... (I have to deal with version changes).
Rather than write lots of statments to serialise each feild in my class
I created a little helper function which gets all the fields in the
class and sends them to the SerializationInfo object.
To get all the feilds in my class I call
GetFields(BindingFlags.Instance | BindingFlags.NonPublic |
BindingFlags.Public)
Unfortunatly this only retrives the public and protected feilds in my
class. My private instance feilds are being left out.
As I am all for respecting a fields privacy I don't wish to make the
fields protected instead.
So the question is fow can my helper function get at these private
fields...
Yes I know this must sound silly, obiously the fields are private hence
are not ment to be messed with. Id rather not mark them as internal
either....
So my qestion is "please help prevent my object from lossing it's
privates".
-dm