XML Serialization - Convert object into XML in C# -


i serializing object xml.

consider class

public class empinfo {     public string code;     public string firstname;     public string lastname;     public string designation;     public int salary; } 

if don't provide salary default set 0 don't want default values set.

in case of designation, if don't provide value automatically null. tag not included in xml.

how should omit salary tag if salary not provided?


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -