...is inaccessible due to its protection level. ?

  • Thread starter Thread starter Arjen
  • Start date Start date
A

Arjen

Hi,

I have this inside a webusercontrol:
private string MenuItem = new string[2];

Inside the .ascx file I do this:
<%= MenuItem(0) %>

And I get this error:
....is inaccessible due to its protection level

I have changed private to public and even removed it... I always get the
same error.

Can somebody help me?

Thanks!
 
Hmmm, found it with <%= MenuItem[0] %> and public

Now I get this error when doing this: MenuItem[x] = "";
Compiler Error Message: CS0200: Property or indexer 'string.this[int]'
cannot be assigned to -- it is read only
 
Back
Top