public class myclass
{
public Details DetailsInfo { get; set; }
public string name{ get; set; }
public string Email { get; set; }
public int subjects{ get; set; }
}
public enum subjects{
maths,
english,
science,
}
Among these subjects is an enum. Even if I don't enter any value for subjects it takes 0 by default. This is the behavior of enum. Is there any way to check if I have chose any value for subject.
Note: I don't want to any value like undefined in the enum.