views:

177

answers:

1

I have a class like this

MyClass : BaseClass
    string new FirstName

When I try to serialize this class I get the following error message

Member SQLClientAdapter.Columns of type hides base class member Adapter.Columns of type ...Use XmlElementAttribute or XmlAttributeAttribute to specify a new name.

The recomendation did not work.

Google recommended to add the Ignore() attribute to the base class however I'm not able to modify the base class.

A: 

Implement ISerializable and do serialization manually or do what the exception message says - rename the property in inherited type in your serialization stream.

Krzysztof Koźmic