1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

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