I have a class and one property is enum. Something like this:
//Do i need [Serializable]
public enum SexEnum
{
Male,
Female
}
[Serializable]
public class Person
{
string Name {get;set;}
SexEnum Sex {get;set;}
}
When I serialize Person with BinaryFormatter, do I need [Serializable] at the enum decleration?
It works fine without it but then why does it allow the [Serializable] attribute in the enum decleration?