Accessing this of containing class

Steven Schveighoffer schveiguy at yahoo.com
Thu Feb 3 11:06:19 PST 2011


On Thu, 03 Feb 2011 13:53:22 -0500, Jonathan M Davis <jmdavisProg at gmx.com>  
wrote:

> On Thursday, February 03, 2011 10:36:29 Ary Manzana wrote:
>> On 2/3/11 10:29 AM, Steven Schveighoffer wrote:
>> >
>> > I have noticed that, is that a bug? I always thought it strange, since
>> > outer is a keyword, that you need to do this.outer.
>> >
>> > -Steve
>>
>> I don't think outer is a keyword.
>
> It's not a keyword. It's a property of non-static inner classes. It's  
> like
> length on an array. It's always there, but it's not a keyword.

You're right, it isn't.  My text editor highlights it like it is, so I  
just assumed...

My question still stands though, why the requirement to use this.outer  
instead of just outer?

-Steve


More information about the Digitalmars-d-learn mailing list