This is my serialized XML
<?xml version="1.0" encoding="utf-8"?>
<HTraceConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<HTraces>
<HTrace>
<HHandlers>
<HHandler>
<HFileName>
<Name>FileName string</Name>
</HFileName>
</HHandler>
<HHandler>
<HFileName>
<Name>FileName string</Name>
</HFileName>
</HHandler>
</HHandlers>
</HTrace>
<HTrace>
<HHandlers>
<HHandler>
<HFileName>
<Name>FileName string</Name>
</HFileName>
</HHandler>
<HHandler>
<HFileName>
<Name>FileName string</Name>
</HFileName>
</HHandler>
</HHandlers>
</HTrace>
</HTraces>
</HTraceConfig>
This is my class file
[Serializable]
public class HTraceConfig
{
private List<HTrace> hTraces;
public List<HTrace> HTraces
{
get { return this.hTraces; }
set { this.hTraces = value; }
}
public HTraceConfig() { }
public HTraceConfig(List<HTrace> HTraces)
{
this.HTraces = HTraces;
}
}
[Serializable]
public class HTrace
{
private List<HHandler> hHandlers;
public List<HHandler> HHandlers
{
get { return this.hHandlers; }
set { this.hHandlers = value; }
}
public HTrace() { }
public HTrace(List<HHandler> hHandlers)
{
this.HHandlers = hHandlers;
}
}
[Serializable]
public class HHandler
{
private HFileName hFileName;
public HFileName HFileName
{
get { return this.hFileName; }
set { this.hFileName = value; }
}
public HHandler() { }
public HHandler(HFileName fileName)
{
this.HFileName = fileName;
}
}
[Serializable]
public class HFileName
{
private string name;
public string Name
{
get { return this.name; }
set { this.name = value; }
}
public HFileName() { }
public HFileName(string Name)
{
this.Name = Name;
}
}
while serializing it is working fine. but when deserialzing if i keep break point in any of the properties set, I am getting list count as zero because I need to call some method to initialize other values while setting that property value. Please any one
help me...