1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Inaccessible due to protection levels

Discussion in 'C#' started by P90PTS, Jan 27, 2011.

  1. P90PTS

    P90PTS New Member

    Joined:
    Jan 27, 2011
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hey,

    I'm currently doing some work on a program i'm creating for Uni, now i'm getting the above error on the following line of code:

    if ((position.X < boundary.Width - 50) && (counter == 0))

    All the variables are set to Public. The error is within an 'Alien' class but the error message says this: ".enemy.counter is inaccessible due to protection levels"

    I have embolded where Visual Basic 2008 is locating the error. I can upload more code if required.

    Any help would be really appreciated!!!

    Cheers

    P
     

Share This Page