How to serialize an ICollection<T> that also has read/write properties to XML
I have class that implement list of custom class. That class also has two properties. But when I serialize that class, XML contains only array of my custom classes but don't contains another two properties. Here is the class: public class Porudzbina : List<PorudzbenicaStavka>, IEnumerable<SqlDataRecord> { public long KomSifra { get; set; } public Guid KomId { get; set; } IEnumerator<SqlDataRecord> IEnumerable<SqlDataRecord>.GetEnumerator() { var sqlRow = new SqlDataRecord( new SqlMetaData("rb", SqlDbType.Int), new SqlMetaData("RobaSifra", SqlDbType.NVarChar, 50), new SqlMetaData("RobaNaziv",