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

How to mention the localhost in android -

php - Calling a template part from a post -

c# - String.format() DateTime With Arabic culture -