There could be some situation where one have some properties and fields defined in the class. Most of time property are exposed as public and they can be easily accessed by object of class.
During the data transfer serialization of objects happens and at that time we have all the public fields and property contained in the class.
Some situation has special needs to prevent serializing public property or fields. Below code snippent shows how to handle such situation.
[XmlIgnoreAttribute]
publicbool IsActive
{
get { returnthis.mIsActive; }
set { this.mIsActive = value; }
}
Have happy coding!!