c# - how to seriliaze object with numeric element name -


public class uname {    [xmlelement("0.23")]    public string name1{get;set;}   } 

when serialize above object generated below

  <uname><_x0030_.23>value</_x0030_.23></uname> 

i need below provided attribute number:

<uname><0.23>value</0.23></uname> 

what want not valid xml. element names must start letter or underscore.

see https://www.w3.org/tr/rec-xml/#nt-namestartchar


Comments

Popular posts from this blog

c# - Update a combobox from a presenter (MVP) -

android - Unable to generate FCM token from dynamically instantiated Firebase -

How to understand 2 main() functions after using uftrace to profile the C++ program? -