[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 11:43:43 +0530 |
User-agent: |
Mutt/1.2.5i |
If memory serves me right, Mohan Embar wrote:
> >A java inner class is simply a class that has a reference to the parent
> >class. You just need to pass a reference to the 'outer' class to the
> >'inner' class's constructor and store it somewhere.
>
> Thank you so much for your reply. Until I read your reply and then reread
> my C# book, I didn't realize that a C# nested class was allowed access
> to its outer class' private member variables too (provided it has
> an instance). I'm still reconciling the similarities and difference
> between both languages. I'm really glad I asked before coding something
> up. Thanks so much again.
Thanks for bringing this up right now ... The DotGNU Java to .NET compiler
was spitting out illegal code right now ...
So to clear up a point ... how does Java figure out the OuterClass
reference to pick up ?
ie
public Inner(Outer parent)
{
this.parent = outer;
}
the "parent" argument in this case ?. Is it implictly provided by the
compiler ?. If so , how ...
I would like to generate similar or identical semantics for our compiler.
Gopal
--
The difference between insanity and genius is measured by success
- [DotGNU]How do you simulate an inner class in C#?, Mohan Embar, 2003/05/25
- Re: [DotGNU]How do you simulate an inner class in C#?,
Gopal V <=
- Re: [DotGNU]How do you simulate an inner class in C#?, Mohan Embar, 2003/05/25
- Re: [DotGNU]How do you simulate an inner class in C#?, Gopal V, 2003/05/25
- Re: [DotGNU]How do you simulate an inner class in C#?, Mohan Embar, 2003/05/25
- 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/25
- Re: [DotGNU]How do you simulate an inner class in C#?, Mohan Embar, 2003/05/26
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