Inconsistent accessibility
What is the following error :
开发者_运维技巧Inconsistent accessibility: parameter type '----.Messagetypes' is less
accessible than method '---.MessageBox---.Messagetypes, string)'
my code :
public partial class Global
{
private enum Messagetypes { Error };
public void MessageBox(Messagetypes MessageDisplay, string MessageError)
{
}
}
What is the correct code
Messagetypes is private, but is a parameter to a public function. The only people that would ever be able to call it are other private members. Either change your function to private, or change your enum to public.
You can't have Messagetype be private since apparently your application is trying to use it outside of the Global class. Change it to public and it should work.
加载中,请稍侯......
精彩评论