|
I'd like to create an internal auto-property:
internal bool IP { get; protected internal set; }
I thought it would be possible to make the setter protected or protected internal - but I always get the error accessibility modifier must be more restrictive...
Started by tanascius on
, 8 posts
by 8 people.
Answer Snippets (Read the full thread at stackoverflow):
It's a common misconception to think protected internal means accessible only to derived classes in the same assembly....
It's accessible both by derived classes and types in the same assembly .
It's effectively protected or internal , not and .
|
|
Internal class Foo { public void Fee() { Debug.WriteLine("Fee"); } internal void Fi() { Debug.WriteLine("Fi"); } }
I'm thinking that Fee() and Fi() are equally accessible since the entire class is already internal. Am I overlooking something? Is there...
Started by ScottS on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
The only reason ....
Public on the methods will have the same effect.
In this case, using internal vs.
The internal class Foo declaration will override the accessibility of the public void Fee() method, effectively making it internal.
|
|
I was having the problem of wanting a property to have an internal getter and a protected setter, as described in this question , and I thought I solved that by doing the following:
public class Accessor : AccessorBase { private Connection _connection...
Started by Sarah Vessels on
, 8 posts
by 8 people.
Answer Snippets (Read the full thread at stackoverflow):
Unfortunately C# doesn't support "internal and protected" access modifiers (only "internal or protected....
If the class Connection is internal, a class deriving Accessor won't be able to call protected, Connection will have to be public.
|
Ask your Facebook Friends
|
In another question I asked, a comment arose indicating that the .NET framework's Array.Copy method uses unmanaged code. I went digging with Reflector and found the signature one of the Array.Copy method overloads is defined as so:
[MethodImpl(MethodImplOptions...
Started by CraigTP on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
The method, you can treat each call to the method in a special way internal to the JIT process.
|
|
My configurations:
(0)Configured all-in-one server (windows 2008) IIS + DNS + AD (the only domain controller)internal IP:192.168.1.200 computer name: w2k8
(1)registered a public domain mydomain.com from ISP
(2)added HOST entry (A) mylan.mydomain.com from...
Started by simon on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at serverfault):
While it is possible for you to forward ICMP packets from the internet to your internal server, why.
|
|
The company where I work has recently decided to use a combination of .NET and Java for all future development efforts. We've been trying to standardize how we organize our code into namespaces (.NET) and packages (Java) and no one really has experience...
Started by Mike Spross on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
(This can be avoided using CompanyName....
The only potential problem with this is the use of Console as a name, given the presence of System.Console .
I would separate the two into CompanyName.ProductName.Broker.Console and CompanyName.ProductName.Broker.Core.
|
|
I have a div with 3 internal hrefs. I need to make the div clickable and have it inherit one of the internal hrefs. Not a problem... however this then causes the JS to overide the other links inside the div, the ones I'm not inheriting for the parent ...
Started by Nathan Pitman on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
This way, in theory, if you click within....
.btns{z-index:999;} .btns a{z-index:-1;}
This will sink btns div to the bottom of element stack, while raising links to the top .
Try setting z-index of the div to 999, and setting z-index of links in the div to -1 .
|
|
Our application uses the MapMaker class from Google collections, and we're getting the exception below, but only on OS X 10.4 using webstart. It works fine when launched from an app bundle, and on OS X 10.5 and Windows.
This has started happening since...
Started by Matt McHenry on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
This could be related....
It sounds like webstart can't find the google library that you are using .
Presumably webstart uses a URLClassLoader, so it follows the explanation here to locate other jars .
I suggest that you check the manifest.mf file of your jar .
|
|
If i have a protected method, can i pass in a parameter where the data type is declared internal?
Started by oo on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Public interface IFoo {} internal class Foo.
Internal types cannot be part, consider using a public interface to abstract the type - i.e.
No, unless the type (with the protected member) is itself internal.
|
|
What is the difference between the "protected" and "protected internal" modifiers in .NET?
Started by Bhaskar on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Foo.ProtectedInternalMethod(); // The line below does compiled in // this assembly (... .
Protected internal
Members are only visible // and the method is marked as "protected internal".
Protected
Members are only visible to inheriting types.
|