enum scope
Mike Parker via Digitalmars-d
digitalmars-d at puremagic.com
Mon Jun 9 00:39:29 PDT 2014
On 6/9/2014 2:51 AM, Walter Bright wrote:
> On 6/7/2014 4:58 PM, deadalnix wrote:
>> You can even use the with statement for code that use the enum
>> intensively, for instance :
>>
>> final switch(myvar) with(UITableViewRowAnimation) {
>> case Fade:
>> // Do fading...
>> case Right:
>> // That's right...
>> case Left:
>> // That's not right..
>> // And so on...
>> }
>
> That use of with never occurred to me! It's cool.
>
I saw it here in the NG some time ago and have been using it ever since.
Love this one.
More information about the Digitalmars-d
mailing list