none
Enums from assembly not showing

    Question

  • I have an assembly that has an enum and method like this:

    namespace assembly
    {
       public enum Myenum
       {
          value1,
          value2,
       }
       public class Myclass{
       {
          public void testMethod(Myenum enumValue)
          {
             //do stuff
          }
       }
    }
    

    However, I'm not able to pass the parameter in the second assembly because my enum wont show

    using assembly;

    namespace assembly2 { public class Myclass2 { public void CallMethod() { new Myclass().testMethod(//Enum not showing); } } }


    I have the assembly referenced in Visual Studio, and the methods work fine, but the enum is not there. Any ideas?

    Tuesday, April 4, 2017 8:06 PM

All replies

  • using assembly;

    namespace assembly2 { public class Myclass2 { public void CallMethod() { new Myclass().testMethod(//Enum not showing); } } }

    Could you elaborate what do you mean by "Enum not showing"? From your code it looks like in your "testMethod()" method you need to pass value.

    Thanks,
    Sabah Shariq

    [If a post helps to resolve your issue, please click the "Mark as Answer" of that post or click Answered "Vote as helpful" button of that post. By marking a post as Answered or Helpful, you help others find the answer faster. ]

    Tuesday, April 4, 2017 8:19 PM
    Moderator
  • When I type

    testmethod()

    and put the parenthesis, my enum should be displayed as Myenum, then dot whatever, but nothing shows

    Tuesday, April 4, 2017 8:20 PM
  • Okay, thats weird. I had to refresh my Visual Studio reference and now its fixed. I have never had to do that before. Thanks for the reply nevertheless
    Tuesday, April 4, 2017 8:23 PM
  • Hi Varscott11,

    If your issue is solved please Mark as answer or Vote as helpful post to the appropriate answer so that it will help other members to find solution if they faces similar issue.

    Your understanding and cooperation will be grateful.

    Thanks,
    Sabah Shariq

    [If a post helps to resolve your issue, please click the "Mark as Answer" of that post or click Answered "Vote as helpful" button of that post. By marking a post as Answered or Helpful, you help others find the answer faster. ]

    Tuesday, April 4, 2017 8:37 PM
    Moderator