By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,678 Members | 2,403 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,678 IT Pros & Developers. It's quick & easy.

overloading operator op_Assign and op_Comma

P: n/a
This guide says that operator methods op_Assign and op_Comma exist, so I
wonder if one can override them:

http://msdn.microsoft.com/library/de...Guidelines.asp

I think you cannot use override these operators in .NET and it is just an
error in the documentation.
I know that at least in C# you cannot override these two operators.
Jul 21 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
I know that at least in C# you cannot override these two operators.


Right, but other languages (such as C++) may let you do it.

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Jul 21 '05 #2

P: n/a
But if you overload op_Assign or op_Comma in C++ you should be able to
directly or indirectly invoke it from C#?
Besides, I've never understood what overloading the comma operator in C++
was good for.
Jul 21 '05 #3

P: n/a
But if you overload op_Assign or op_Comma in C++ you should be able to
directly or indirectly invoke it from C#?


I believe you can call them as regular static methods.

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Jul 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.