E.g.
"Jon Skeet [C# MVP]" <s
@pobox.com> schrieb im Newsbeitrag
news:1180523923.706090.97220@k79g2000hse.googlegroups.com...
> On May 30, 12:01 pm, "Bengan" <b
@yahoo.com> wrote:
>> Where can you see if a class has overloaded operator(like +,-) in
>> Microsofts
>> NET class library on the net? They list members, properties, fields and
>> other stuff for a class but no operatoroverloading.
>> It would be nice to know if a class uses overloaded opetors so you know
>> if
>> its the default behavior or not when using these operators.
> Operators *are* documented, as opGreaterThan, opInequality etc
> methods. See DateTime for an example.
But they don't list operators predefined by C# (like int + int). For this
you have to look in the C# reference or specification.
Christof
-----------------------------------------------Reply-----------------------------------------------
On May 30, 1:27 pm, "Christof Nordiek" <c
@nospam.de> wrote:
> > Operators *are* documented, as opGreaterThan, opInequality etc
> > methods. See DateTime for an example.
> But they don't list operators predefined by C# (like int + int). For this
> you have to look in the C# reference or specification.
Indeed. For *most* of the operators, this is probably expected. The
one which is most likely to catch people out (IMO) is string
concatenation, which is a C# operator but not a .NET operator. (The C#
compiler can call String.Concat to concatenate multiple strings in one
go, for instance, which couldn't be done by a normal + operator.)
Jon