Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6212723
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T06:34:05+00:00 2026-05-24T06:34:05+00:00

I have a class Actions with an Enum in it [DataContract] public class Actions

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T06:34:07+00:00Added an answer on May 24, 2026 at 6:34 am

    WCF produces its own names for the Types that you’re returning from your web service methods. It usually tries to name things based on their local names, but I’m guessing it can’t really “namespace” the types, so the type can’t include a . inside of it. WCF therefore is doing its best to create an enum type for purposes of its service that has a descriptive name, but which fits into the SOAP schema (or whatever binding you’re using).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an enum: public enum Action { Remove=1, Add=2 } And a class:
I have public enum BaseActions implements Actions{ STAND (0,0,0), TURN (1,1,1); //other stuff }
So, I have an abstract class like: public abstract class AbstractParent <E extends Enum<E>>
So, I have a actions.class.php and have the function like that: public function executeGetHTML($request)
i have this code in actions.class.php public function executeListmatches(sfWebRequest $request) { $form_values = $request->getParameter('match_form',
I have a class that I need to perform some actions on but I
I have an action like this: public class News : System.Web.Mvc.Controller { public ActionResult
I have a controller with an action method as follows: public class InventoryController :
I have a class with a property which is an enum The enum is
I have a ViewModel that looks like this: public class CreateReviewViewModel { public string

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.