Re: CLS complaint = Operators should not be overloaded
- From: "Zytan" <zytanlithium@xxxxxxxxx>
- Date: 9 Mar 2007 10:15:08 -0800
"Only properties and methods may be overloaded, Operators should not
be overloaded."
That is not correct. If you overload an operator, you *should* provide an
alternative method that fulfills the same purpose. This keeps your type fully
usable for .NET languages that don't support operator overloading (see System.DateTime
for example).
Great, and this totally makes sense. So, I can do it, and people who
use the more powerful languages can take advantage of it, but for
those without such features, they can still use my unit!
Thanks, Joerg!
Zytan
.
- References:
- CLS complaint = Operators should not be overloaded
- From: Zytan
- Re: CLS complaint = Operators should not be overloaded
- From: Joerg Jooss
- CLS complaint = Operators should not be overloaded
- Prev by Date: Re: CLS complaint = Operators should not be overloaded
- Next by Date: Re: Programming the User-Account_Property using C#
- Previous by thread: Re: CLS complaint = Operators should not be overloaded
- Next by thread: Grid view control
- Index(es):