Properties don't behave like variables?
Steven Schveighoffer
schveiguy at yahoo.com
Mon May 7 14:09:10 PDT 2012
On Mon, 07 May 2012 16:15:54 -0400, Mehrdad <wfunction at hotmail.com> wrote:
> On Monday, 7 May 2012 at 12:43:42 UTC, Steven Schveighoffer wrote:
>> On Sun, 06 May 2012 22:05:20 -0400, Mehrdad <wfunction at hotmail.com>
>> wrote:
>>
>>> Why doesn't this compile?
>>>
>>> @property int foo() { return 1; }
>>> @property void foo(int v) { }
>>>
>>> void main()
>>> {
>>> foo |= 2;
>>> }
>>
>> It's like this in C#.
>
> Um, I to differ...
Oh! I didn't express myself properly :) It's like this in C# means that
the above *does* compile in C# :) Sorry for the confusion.
-Steve
More information about the Digitalmars-d
mailing list