How .Net Serialization Works

I have a feeling that this is a repot, but I can not find any good information about this. I'm just wondering how serialization works (well, deserialization itself). I am wondering if I have a property that is not really supported by a private field; i.e:.

public string SomeProp {
   get {
      return GetValue("SomePropKey");
   }
   set{
      SetValue("SomePropKey", value);
   }
}

When do I deserialize the caller's call? A getter gets called on serialization, because when I serialize an object, the correct value is written to the output stream. I know this sounds like a strange circumstance, but what happens? Or am I just complicating this too much ....

+5
source share
3 answers

, .

XmlSerialization, , .

(DataContractSerialization), getter/setter , DataMember ( ).

.NET( IFormatter), , , .

+7

XML "" (/), -afaik - .

AFAIK, BinaryFormatter SoapFormatter, /, .
, 2-arg, SerializationInfo StreamingContext.

, ISerializable. , , , , .

0

, , , . . , Reflector. .net .

0

All Articles