I have a flag attribute enumeration that is behind a web service as follows:
[Serializable,Flags]
public enum AccessLevels
{
None = 0,
Read = 1,
-
I have done extensive research on this and found that it is not possible to serialize enumeration constants through a web service. Note that to accomplish your goal you don't need the enumerations None or Full. These two enumerations can be implied with read / write combination:
You could assume full access if your AccessLevels = Read | Write
and none if your AccessLevels = 0 [nothing]
Your enumerations would look like this:
[Serializable,Flags]
public enum AccessLevels
{
Read = 1,
Write = 2
}
- 热议问题