这个错误我该怎么办?

编程入门 行业动态 更新时间:2024-10-25 08:25:58
本文介绍了这个错误我该怎么办?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我该怎么办? 错误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,你可以有更多的自由并减少派生类的可访问性,这通常是有意义的。
-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

更多推荐

这个错误我该怎么办?

本文发布于:2023-10-18 12:17:50,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1504208.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:我该   错误

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!