Hi!
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.
Regards
Bengan 4 1703
On May 30, 12:01 pm, "Bengan" <b...@yahoo.comwrote:
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.
Jon
E.g. http://www.c-sharpcorner.com/UploadF...erloading.aspx
WBR, Alex Meleta
Blog:: devkids.blogspot.com
BHi!
B>
BWhere can you see if a class has overloaded operator(like +,-) in
BMicrosofts NET class library on the net? They list members,
Bproperties, fields and other stuff for a class but no
Boperatoroverloading.
B>
BIt would be nice to know if a class uses overloaded opetors so you
Bknow if its the default behavior or not when using these operators.
B>
BRegards
BBengan
"Jon Skeet [C# MVP]" <sk***@pobox.comschrieb im Newsbeitrag
news:11*********************@k79g2000hse.googlegro ups.com...
On May 30, 12:01 pm, "Bengan" <b...@yahoo.comwrote:
>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
On May 30, 1:27 pm, "Christof Nordiek" <c...@nospam.dewrote:
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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Chiller |
last post by:
Ok, this is a continuation of a problem I posted on an earlier thread. I've
started another thread because my problem has progressed from the initial
constructor problem into a general method...
|
by: Douglas Peterson |
last post by:
class Allocator
{
public:
virtual void * Alloc(size_t) = 0;
virtual void * Free(void*) = 0;
};
class Object
{
public:
|
by: Sean |
last post by:
Can someone help me see why the following "operator=" overloading
doesn't work under g++? and the error message is copied here. I see no
reason the compiler complain this. Thanks,
$ g++...
|
by: Chris |
last post by:
To me, this seems rather redundant. The compiler requires that if you
overload the == operator, you must also overload the != operator. All I do
for the != operator is something like this:
...
|
by: mast2as |
last post by:
Is it possible to limit a template class to certain types only. I found
a few things on the net but nothing seems to apply at compile time.
template <typename T>
class AClass
{
public:...
|
by: alacrite |
last post by:
I have a class that I want to turn its contents into csv file. I want
to be able to set the value of the delimiter, the name of the file it
gets saved to, the path of that file, and maybe a few...
|
by: Hamilton Woods |
last post by:
Diehards,
I developed a template matrix class back around 1992 using Borland C++ 4.5
(ancestor of C++ Builder) and haven't touched it until a few days ago. I
pulled it from the freezer and...
|
by: =?iso-8859-2?B?SmFuIFJpbmdvuQ==?= |
last post by:
Hello everybody,
this is my first post to a newsgroup at all.
I would like to get some feedback on one proposal I am thinking about:
--- begin of proposal ---
Proposal to add...
|
by: Malciah |
last post by:
I posted this on another site, but so far I've had no answers.
So, I decided to try it here.
--------------------------------------------------------
I've been learning C++ for about 6 weeks now,...
|
by: Jess |
last post by:
Hi,
I read about operator overloading and have a question regarding
"operator->()". If I have two classes like this:
struct A{
void f();
};
struct B{
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |