.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Easy Web
Imran Ghani
Post New Web Links

xmlattribute

Posted By:      Posted Date: April 14, 2011    Points: 0   Category :WPF
 

Hi, 

 

i am writing code so that an object can be serialized, which works fine but when i add [XmlAttibute] to a property in my object. the attribute is added to the root element instead of the specific element i want. Can i decide which element i want the property to be an attribute of?

eg

 
  public class Calculation
  {
    public int a;
    public int b;
    [XmlAttribute] public int c;
   }

int c will be an att of Calculation but i want it to be an att of b

 

Thanks


Kelvin


View Complete Post


More Related Resource Links

Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend