473,763 Members | 1,382 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

protected internal

Hin
from MSDN, decription for protected internal is

"Access is limited to the current project OR types derived from the containing
class"

Is there any way i can have the access limited to the types derived from the
containing class that are also in current project?
any access modifier can achieve this?
Thanks.

--
Regards,
Hin
Nov 16 '05 #1
2 4407
No there is not.
I would use just internal.
--
Regards,
Dennis JD Myrén
Oslo Kodebureau
"Hin" <yh*****@hotmai l.com> wrote in message
news:Oy******** ******@TK2MSFTN GP09.phx.gbl...
from MSDN, decription for protected internal is

"Access is limited to the current project OR types derived from the containing class"

Is there any way i can have the access limited to the types derived from the containing class that are also in current project?
any access modifier can achieve this?
Thanks.

--
Regards,
Hin

Nov 16 '05 #2
What you want is protected and internal, although this functionality is
available in .Net CLR via the famandassem access modifier, it is not
available in C# or VB.Net. You will have to write the module in IL or
some other language that supports this attribute.

Sijin Joseph
http://www.indiangeek.net
http://weblogs.asp.net/sjoseph

Hin wrote:
from MSDN, decription for protected internal is

"Access is limited to the current project OR types derived from the containing
class"

Is there any way i can have the access limited to the types derived from the
containing class that are also in current project?
any access modifier can achieve this?
Thanks.

Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
2546
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 AND assembly" accesibility level, that is, a member is accesible from derived classes belonging to...
6
12000
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
6061
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
6404
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 private in C#, can I access it in a decendant class?
3
2158
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 protected internal method to the subclass, I can access it.)
4
6303
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
3631
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
2826
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 access modified from 'protected', which is clearly not the case. (I have checked the metadata in...
17
1439
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 trust between the base class and any derived classes - because the derived classes have unrestricted or...
2
1978
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 library can see it.
0
9386
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10145
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9998
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9938
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
9822
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8822
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5270
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3917
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
3
2793
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.