|
 |
Mike Raiford <"m[raiford]!at"@gmail.com> wrote:
> Warp wrote:
> > Ah, so this extension can be used for operator overloading in C#?
> > Nobody told me that before.
> Operator overloading has existed since C# 1.0
I was being sarcastic.
> I think the poster was trying to demonstrate a syntatic sugar feature
> you may be familiar with and might like.
And the demonstration was invalid.
We are talking about "object.function()" vs. "function(object)", not
about "a+b+c" vs. "add(a, add(b, c))".
> Rather than using, for example:
> GraphicsExtensions.DrawButton(g, rcArea, caption);
> You could define it so you simply type
> g.DrawButton(rcArea, caption);
I see no relevant difference to making a function so that you can write
"DrawButton(g, rcArea, caption)".
--
- Warp
Post a reply to this message
|
 |