access modifiers
-
can anybody explain about friend and protected friend briefly? i have seen somewhere it is protected or friend but not protected and friend...what is the use of protected friend? we have friend, protected separately?:)
pavan...
It's not called 'friend' in C# it's 'internal'. 'internal' means any class in the same assembly can access it. 'protected' means any class that any inheriting class can access it. 'internal protected' (or 'protected internal' ;) ) means that any class in the same assembly AND any inheriting class can access it. In .Net 2.0 you can have 'friend' assemblies. If you make an assembly a 'friend' of another then it will have access to anything marked internal as if it was in the same assembly. MSDN: Access Modifiers[^] MSDN: Friend Assemblies[^]
-
It's not called 'friend' in C# it's 'internal'. 'internal' means any class in the same assembly can access it. 'protected' means any class that any inheriting class can access it. 'internal protected' (or 'protected internal' ;) ) means that any class in the same assembly AND any inheriting class can access it. In .Net 2.0 you can have 'friend' assemblies. If you make an assembly a 'friend' of another then it will have access to anything marked internal as if it was in the same assembly. MSDN: Access Modifiers[^] MSDN: Friend Assemblies[^]
-
It's not called 'friend' in C# it's 'internal'. 'internal' means any class in the same assembly can access it. 'protected' means any class that any inheriting class can access it. 'internal protected' (or 'protected internal' ;) ) means that any class in the same assembly AND any inheriting class can access it. In .Net 2.0 you can have 'friend' assemblies. If you make an assembly a 'friend' of another then it will have access to anything marked internal as if it was in the same assembly. MSDN: Access Modifiers[^] MSDN: Friend Assemblies[^]
if u please explain it a little bit with an example.that explains the limit of using there modifiers Thanks You.
Sonia Gupta Soniagupta1@yahoo.co.in Yahoo messengerId-soniagupta1 Love is Friendship and Friendship is Love....
-
if u please explain it a little bit with an example.that explains the limit of using there modifiers Thanks You.
Sonia Gupta Soniagupta1@yahoo.co.in Yahoo messengerId-soniagupta1 Love is Friendship and Friendship is Love....
-
if u please explain it a little bit with an example.that explains the limit of using there modifiers Thanks You.
Sonia Gupta Soniagupta1@yahoo.co.in Yahoo messengerId-soniagupta1 Love is Friendship and Friendship is Love....
Protected internal ………meaning is protected or internal…which is selected by including Both a protected and an internal modifier in the member declaration. The intuitive meaning of protected internal is “access limited to this program or types derived from the containing class. Protected internal is a union of protected and internal in terms of providing access but not restricting. Meaning Inherited types, even though they belong to a different assembly, have access to the protected internal members Types that reside in the same assembly, even if they are not derived from the type; also have access to the protected internal members
pavan...
-
if u please explain it a little bit with an example.that explains the limit of using there modifiers Thanks You.
Sonia Gupta Soniagupta1@yahoo.co.in Yahoo messengerId-soniagupta1 Love is Friendship and Friendship is Love....