Customizing public property serialization attribute

Apr 7, 2011 at 1:45 AM
Edited Apr 7, 2011 at 1:45 AM

Hello,

Is it possible to customize serialization attribute of public properties? I am looking for the tool to generate code like this (i.e., with the specified attributes & no private fields):

namespace namespace1

{

    [XmlRootAttribute("class1")]

    public class class1

   {

              [XMLElementAttribute("MyIdentifier")]

              public String MyIdentifier {get; set; }

             .....

    }

}

Thanks in advance!