Class is inaccessible due to its protection level

后端 未结 9 1817
孤街浪徒
孤街浪徒 2020-12-07 01:00

I have three classes. all are part of the same namespace. here are the basics of the three classes.

//FBlock.cs
namespace StubGenerator.PropGenerator
{
    c         


        
相关标签:
9条回答
  • 2020-12-07 01:34

    Hi You need to change the Button properties from private to public. You can change Under Button >> properties >> Design >> Modifiers >> "public" Once change the protection error will gone.

    Budi

    0 讨论(0)
  • 2020-12-07 01:36

    It may also be the case that the library containing the class in question is not properly signed with a strong name.

    0 讨论(0)
  • 2020-12-07 01:36

    All your classes are internal by default

    Marking public did not do the trick.

    Are you sure you do not have two classes named Method, and perhaps are including the wrong Method class?

    0 讨论(0)
提交回复
热议问题