dotgnu-general
[Top][All Lists]
Advanced

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

Re: [DotGNU]How do you simulate an inner class in C#?


From: Mohan Embar
Subject: Re: [DotGNU]How do you simulate an inner class in C#?
Date: Sun, 25 May 2003 01:24:39 -0500

Hi Gopal,

>So to clear up a point  ... how does Java figure out the OuterClass 
>reference to pick up ?

My favorite reference is:

http://java.sun.com/docs/books/jls/second_edition/html/classes.doc.html#262890

>Is it implictly provided by the compiler ?

Yes. Every (non-static) inner class has what is known as an "outer this" 
reference
that the compiler magically factors in in the same way a C++ compiler factors in
a this pointer for non-static methods.

>If so , how ...

I guess that would depend on the compiler :)

>I would like to generate similar or identical semantics for our compiler.


reply via email to

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