可访问性不一致:字段类型“世界”比现场“少访问frmSplashScreen [英] Inconsistent accessibility: field type 'world' is less accessible than field 'frmSplashScreen
本文介绍了可访问性不一致:字段类型“世界”比现场“少访问frmSplashScreen的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有叫这个错误可访问性不一致:
I have this error called Inconsistent accessibility:
字段中键入世界比外地少访问frmSplashScreen
field type 'world' is less accessible than field 'frmSplashScreen'
在我的代码中有一个名为 frmSplashScreen
In my code there is a public partial class called frmSplashScreen
还有一个名为全球
这导致错误的行公共类是:
The line that caused the error was:
private world currentWorld;
上面的线是在类 frmSplashScreen
什么原因造成的问题?
推荐答案
通常,这是因为你的字段是私人
。你必须将其更改为公共
:
Generally this happens because your field is private
. You must change it to public
:
public world currentWorld;
这篇关于可访问性不一致:字段类型“世界”比现场“少访问frmSplashScreen的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文