本文介绍了这个错误我该怎么办?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
-SA
What shall you do? You should fix it. If you derive some class from the class defined in the same assembly, you need to use the same access modifier as the one of the base class. Learn about access specifiers if you are still not confident with them:
msdn.microsoft/en-us/library/ms173121.aspx[^],
msdn.microsoft/en-us/library/wxh6fsc7.aspx[^].
If the base class you use is from the assembly other than the one of your derived class, you can have more freedom and reduce the accessibility of the derived class, which often make sense.
—SA
我该怎么办? 错误2可访问性不一致:参数类型'SimpleCryptographer.ProgressEventArgs'比委托'SimpleCryptographer.Form1.ProgressEventHandler'D更难访问:\ SimpleCryptographer \Form1.cs 15 30 SimpleCryptographer
what shall i do ?? Error 2 Inconsistent accessibility: parameter type 'SimpleCryptographer.ProgressEventArgs' is less accessible than delegate 'SimpleCryptographer.Form1.ProgressEventHandler' D:\SimpleCryptographer\Form1.cs 15 30 SimpleCryptographer
推荐答案你要做什么?你应该解决它。如果从同一程序集中定义的类派生某个类,则需要使用与基类相同的访问修饰符。如果您对它们仍然没有信心,请了解访问说明符: http:/ /msdn.microsoft/en-us/library/ms173121.aspx [ ^ ], http ://msdn.microsoft/en-us/library/wxh6fsc7.aspx [ ^ ]。 如果你使用的基类来自汇编而不是你的派生类class,你可以有更多的自由并减少派生类的可访问性,这通常是有意义的。
更多推荐
这个错误我该怎么办?
发布评论