override(T)

Michal Minich michal at minich.sk
Thu Sep 24 08:15:50 PDT 2009


> So I was thinking of this:
> 
> class LotterySimulation : Lottery, Figure {
> override(Lottery) void draw();
> override(Figure) void draw();
> }
> This is easy to implement, scales well, and has good real world uses.
> What say you?
> 
> Andrei
> 

I think this is well solved in C#

http://msdn.microsoft.com/en-us/library/aa664591%28VS.71%29.aspx

The syntax is simpler.

Members implemented explicitly are not accessible thru variable of concrete 
class instance - they are only accessible thru variables of interface type 
(or when explicitly casted). If I understand you correctly, this is the same 
way as you propose for D.





More information about the Digitalmars-d mailing list