dotgnu-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [DotGNU]C@


From: Peter Minten
Subject: Re: [DotGNU]C@
Date: Mon, 12 Aug 2002 19:12:06 +0200

Peter Minten wrote:

> Good ideas, now we just need to figure out how to weave them into the 
> language.

I've worked it out. The private inheritance can be put in like this:

"public class Foo : PublicParent, PublicInterface private PrivateClass"

All classes after the keyword private are privately inherited, also no
interfaces may appear behind the private keyword (since they can't be privately
inherited it would create confusion if this was allowed).

Friend stuff is declared like this:

[friend "FriendClassA"]
class Foo
{
        [friend "FriendNamespaceB"]
        private void Fred {}

        [friend "FriendClassC"]
        [friend "FriendNamespaceB.FriendClassD"]
        private int Barney {}

        [friend "FriendClassC"]
        private int number;
}

Note that a class can have a friend that can access everything in the class, a
method can have a friend that can access the method even if declared private,
friends can be either one class or one namespace (in which case all classes in
that namespace, but not classes in a namespace under the friend act like class
friends), one method, class, property, event, property or delegate can have
multiple friends.

Greetings,

Peter




reply via email to

[Prev in Thread] Current Thread [Next in Thread]