View Single Post
Old Oct 1st, 2005, 11:33 PM   #4
xavier
Professional Programmer
 
xavier's Avatar
 
Join Date: Oct 2004
Location: .ro
Posts: 379
Rep Power: 4 xavier is on a distinguished road
Send a message via Yahoo to xavier
If the button is private , it means that it's only seen in its class, it will not be accesible in other classes ... So, how the hell did it show you the private button from A ?

Or am I misunderstanding the problem ?

If i have this :
	public class A
	{
		private static int i = 0;
		public static int t = 1;
	}

	public class B : A
	{
		public static int p = 2 ;
		public static void Main()
		{
			Console.WriteLine("i = {0} , t={1}, p={2}",i,t,p);
			Console.ReadLine();
		}
	}

It sais it can't access i because of its protection level.
__________________
Don't take life too seriously, it's not permanent !
xavier is offline   Reply With Quote