473,587 Members | 2,524 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

protected internal

82 New Member
hi all,
again i need a clarification. the access modifier protected means that class members are accessible from its own class and its derived class only.
internal means that the class member is accessible in its own assembly.
protected internal is the union of both. does it mean that derived classes may reside in different assembly too and hence this novel modifier 'protected internal' came into existence????
hope i have conveyed my doubt clearly.
Feb 24 '07 #1
4 9473
kenobewan
4,871 Recognized Expert Specialist
Here is an article that may help:
Object Oriented C# for ASP.NET Developers
Feb 25 '07 #2
aaryan
82 New Member
Here is an article that may help:
Object Oriented C# for ASP.NET Developers
thank u kenobewan,
that site is of use to me. can u just clear another doubt. the difference between hiding and overriding.
Feb 26 '07 #3
kenobewan
4,871 Recognized Expert Specialist
Here is an article that may help:
Overriding, Shadowing and Hiding in .NET
Feb 27 '07 #4
aaryan
82 New Member
Here is an article that may help:
Overriding, Shadowing and Hiding in .NET
hi, went thro; the website.thanks for that but can u just give me a code example for the following statement extracted from the same site.

The difference lies when you call the derived class object with a base class variable.In class of overriding although you assign a derived class object to base class variable it will call the derived class function. In case of shadowing or hiding the base class function will be called.

i feel an example for this will create a strong understanding for this.
Feb 28 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

8
2532
by: Carlos J. Quintero | last post by:
Hi, As you know the current keywords "protected internal" (C#) or "Protected Friend" (VB.Net) means "Protected Or internal" (C#) or "Protected Or Friend" (VB.Net), that is, the member is accesible from whichever types inside the assembly or from derived classes included those outside the assembly. The IL has a provision for the "family...
6
11991
by: Sgt. Sausage | last post by:
I know it's not possible, but I need a protected internal interface: protected internal interface ISomeInterface{ // yadda yadda yadda } Basically, I need an interface that is completely accessable from within the assembly (internal), but is not valid outside
2
6055
by: Kolozs, √Āron | last post by:
Hi everybody, The C# compiler reports a Compiler Error CS0052 in the following situation: I declared a type marked as "internal": namespace MyNamespace { internal class MyInteralClass
7
6400
by: My4thPersonality | last post by:
1st, simple question, is there a protected in C#? I mean a comparable keyword like the C++ protected, which defines a member as accessable for decendants, but not for the outside world. Then, a more complicated question, is privat in C#, then comparable with protected, or private in C++. Or to say it in other words, if I declare a member...
3
2155
by: ssg31415926 | last post by:
I have an abstract base class from which has concrete subclasses. I have a method on the base class marked as 'protected internal'. I have another class in the same assembly which holds a reference to an instance of one subclass. I don't seem to be able to see the protected internal method. Should I? If not, why not? (If I add a...
4
6263
by: newbie120 | last post by:
Hi all maybe its just been a long day, but i have a question about call access modifiers in C#. Consider the following code. namespace Application { private class Class1 { int i;
16
3617
by: Fir5tSight | last post by:
Hi All, I have a small C#.NET program that is as follows: using System; class A { protected int x = 123; }
13
2818
by: Clive Dixon | last post by:
I am refactoring some code to move some base classes into a separate assembly. One of these base classes has a member property which is 'protected internal'. However when I move these base classes to another assembly, the compiler complains that the override in the derived class, also declared as 'protected internal', is trying to change the...
17
1433
by: Jeremy S. | last post by:
Just getting into OOP here... I remember reading somewhere that having protected and/or internal member variables is to generally be avoided or potentially a "bad thing" because having such members violates the OOP principle of encapsulation. The way it was presented was something like, "having a protected member implies a high degree of...
2
1972
by: jehugaleahsa | last post by:
Hello: I have a public abstract class. The concrete subclasses must pass an instance of an internal class to the abstract class' ctor. I like to make the constructors of my abstract classes protected. However, since it has a parameter that is of an internal type, I am forced to make it internal also. This is fine since no one outside my...
0
7918
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, weíll explore What is ONU, What Is Router, ONU & Routerís main...
0
8206
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8340
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7967
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8220
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6621
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectóplanning, coding, testing, and deploymentówithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5392
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3875
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2353
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.