C# Programming - Polymorphism - Discussion

Discussion :: Polymorphism - General Questions (Q.No.1)

1. 

Which of the following unary operators can be overloaded?

  1. true
  2. false
  3. +
  4. new
  5. is

[A]. 1, 2, 3
[B]. 3, 4, 5
[C]. 3 only
[D]. 5 only

Answer: Option A

Explanation:

No answer description available for this question.

Sundar said: (Jul 3, 2011)  
C# Operator overloading:

http://msdn.microsoft.com/en-us/library/aa691324(v=vs.71).aspx

Midhun Sankar said: (Jul 26, 2011)  
New and is are keywords not operators

Shree said: (Feb 2, 2013)  
It is not possible to overload member access, method invocation, or the =, &&, ||, ?:, checked, unchecked, new, typeof, as, and is operators.

Veyronash said: (Apr 13, 2013)  
Only the unary, binary and comparison operators can be overloaded.

Keeping in mind that the comparison operators occur in pairs.

Suchi Jain said: (Jul 15, 2015)  
In this option true, false, new, is, not a operators. Only one operator is there unary (+) which we can overloaded. So answer + is right.

Nagarjuna said: (Feb 3, 2017)  
Answere 3 is right. Because in the question asked Unary.

Lew said: (Nov 27, 2017)  
True, false are unary.

Vladimir said: (Nov 21, 2018)  
Are "true" and "false" unary operators in C#? Please tell me.

Ravikhagga said: (Aug 7, 2019)  
True, false -> unary operators.

Post your comments here:

Name *:

Email   : (optional)

» Your comments will be displayed only after manual approval.