I have this :
[Flags]
public enum InfoAbonne{civilite,name,firstname,email,adress,country }
public class Formulaire
{
private InfoAbonne _infoAbonne{ get; set;}
public Formulaire()
{}
}
I want to Xml serialize Formulaire
If I init :
_infoAbonne = InfoAbonne.name | InfoAbonne.email;
In my Xml Result I get only :
<InfoAbonne>email</InfoAbonne>
Even though you added the
Flagsattribute to your enum, you still need to make sure that the values are powers of two:See the guidelines laid out in the Remarks section of the documentation.