I think mcs is mishandling the modifiers in this case. See this excerpt from the C# Language Specification.

The declared accessibility of a member can be one of the following:
...
* Protected internal (meaning 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�.
...

To be clearer, the last phrase may be complemented with: ', even if that derived class does not live in the same assembly.'

The key concept here is that when using both modifiers we have an 'or' relationship not an 'and' relationship. I disagree with that text's writer about it being the 'intuitive meaning'...

Happy Hackings,

Rafael Teixeira
Brazilian Polymath



From: ville <[EMAIL PROTECTED]>
To: "mono-list" <[EMAIL PROTECTED]>
Subject: [Mono-list] XmlDocument.cs
Date: Sat, 30 Nov 2002 11:11:52 +0200


Hi

There must be some error in msdn becouse XmlDocument class contains:

protected internal virtual XPathNavigator CreateNavigator(XmlNode);

And XmlDataDocument class which is derived from XmlDocument contains

protected override XPathNavigator CreateNavigator(XmlNode);

So when trying to compile this:

System.Xml/XmlDataDocument.cs(276) error CS0507:
`System.Xml.XmlDataDocument.CreateNavigator': can't change the access
modifiers when overriding inherited member `XmlDocument.CreateNavigator'
Compilation failed: 1 error(s), 0 warnings

So should it be internal or just protected?

ville







_______________________________________________
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list
_________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail


_______________________________________________
Mono-list maillist - [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to