Originally posted by Rana Thakur:
Or maybe what siva means is that (in his example), when I call A.CalDifference(B) then CalDifference () of A is being invoked. Inside that function the value of private variable iFeet of object A can be accessed (this.iFeet) and the value of private variable iFeet of object B can be obtained too (feet.iFeet).
Thus in this function not only I can access the iFeet of A (which is invoking this function) but also the private field i.e. iFeet of object B.
And of course, other than the class Feet, say in class PrivateAccessTest, if one tries to access the private variable of any object the compiler will complain.