I have a class Actions with an Enum in it
[DataContract]
public class Actions
{
[DataContract]
public enum MailDirectLinkContent
{
[EnumMember]
[DescriptionAttribute("Second account holder")]
SecondAccountHolder = 0,
[EnumMember]
[DescriptionAttribute("Legal representative")]
LegalRepresentative = 1,
[EnumMember]
[DescriptionAttribute("Authorized representative")]
AuthorizedRepresentative = 2
}
}
In my wcf-service I have a method
[OperationContract]
void DoActionMailDirectLinkContent(string toAddress, Actions.MailDirectLinkContent mailDirectLinkContent);
When I want to use this Enum in my webclient, it comes up like this:
var myValue = ActionsMailDirectLinkContent.AuthorizedRepresentative;
(the dot between the class-name and the enum-name disappears)
I suppose there is a decent explanation for this behaviour, but I couldn't find one.
UPDATE: I took the Enum out of the class and put it in a subfolder so that they are still grouped together. The reason for this change is another issue I came accross and was able to solve it this way.