[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [DotGNU]How do you simulate an inner class in C#?
From: |
Gopal V |
Subject: |
Re: [DotGNU]How do you simulate an inner class in C#? |
Date: |
Sun, 25 May 2003 14:18:05 +0530 |
User-agent: |
Mutt/1.2.5i |
If memory serves me right, Mohan Embar wrote:
> http://java.sun.com/docs/books/jls/second_edition/html/classes.doc.html#262890
Which is long & protracted ... I don't really have that much buffer space
up here :-(
> 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.
So the inner classes are inaccessible from outside ? (unlike nested
classes ?)
> I guess that would depend on the compiler :)
Like, I'm thinking about having an extra arg for each inner class
constructor (just like ^Tum suggested you to emulate) and pull the
"this" reference from wherever it's called and push into "parent" ?.
I'll investigate using the bytecode jikes generates ...
Thanks,
Gopal
--
The difference between insanity and genius is measured by success
RE: [DotGNU]How do you simulate an inner class in C#?, Thong \(Tum\) Nguyen, 2003/05/25
Re: [DotGNU]How do you simulate an inner class in C#?, Gopal V, 2003/05/27