is there "this"?

Bauss via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Nov 2 00:26:57 PDT 2016


On Wednesday, 2 November 2016 at 02:42:01 UTC, Konstantin 
Kutsevalov wrote:
> On Wednesday, 2 November 2016 at 02:33:10 UTC, Konstantin 
> Kutsevalov wrote:
>> On Wednesday, 2 November 2016 at 02:20:43 UTC, rikki 
>> cattermole wrote:
>>> On 02/11/2016 3:17 PM, Konstantin Kutsevalov wrote:
>>>> [...]
>>>
>>> You forgot an int in the arguments but otherwise that would 
>>> work fine with your line uncommented.
>>
>> yes I missed "int", but it's just an example.
>> so if I'll write "this.property = value" it will work?
>
> I tested already and it really works, thank you.
> I asked that because I tried once to use "this" in past but I 
> got error. So I asked on some forum "how to get property of 
> class?" and peoples said that I may use just a name of 
> property. So I thought that there isn't "this" word.

Well "this" in D has different meanings as it depends on its 
context sometimes.


More information about the Digitalmars-d-learn mailing list