Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8292575
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T13:31:56+00:00 2026-06-08T13:31:56+00:00

I did go through this and this before actually posting this. But those are

  • 0

I did go through this and this before actually posting this. But those are for C++. Do the same things apply on C# as well? And the second link I have provided states that conditional operator cannot be overloaded, I didn’t see the reason why(assuming the same applies on C# as well). Can someone provide links for further reading, or just clarify the matter?

EDIT:

I’m not onto any actual scenario where I would need to overload this operator, but I was just curious as to why it can’t be overloaded. Is it just because there isn’t any actual possible situation where such overloading could provide any significant functionality?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T13:31:58+00:00Added an answer on June 8, 2026 at 1:31 pm

    The list of overloadable operators is here. Some you can, and some you can’t.

    This page shows how to overload the ones that can be overloaded.

    As for the conditional operator (?:), no, you cannot overload it. It is specific to booleans. What would it mean if you did overload it? It’s a shorthand for if/then/else.

    I suppose the way you could rephrase the question is: “Why can’t I overload if/then/else”?

    The real reason, more than likely, probably has to do with the fact that the designers of the language chose not to implement it. More than likely, providing an overload for this operator doesn’t provide enough benefit to merit the testing and effort that would go into making it overloadable. In short, it’s probably a time/money reason. For every feature added to a computer language, that means time, effort and testing, which has to be balanced against the benefit provided by the feature.

    In the end, some things just aren’t worth implementing. While I’m sure you can find some benefit to it, the benefit is probably outweighed by the cost of implementation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Did you ever have the following situation: you need to store information, but a
Disclaimer: I have already seen the following questions and their solutions did not apply
I've found a couple similar posts regarding this same problem, but none of the
I have asked a similar question before, but I didn't have a firm grasp
I have quite a large project, actually 2 but they share a lot of
This is getting extremely irritating. Right now I have a winforms application, and things
I am trying to compile a C program through a javacode. I did it
I'm trying to make a click at desktop through code, so I did that:
Did you used Dynamic websites before? you see its a good way for making
Did about 30 minutes worth of searching, found lots of relevant info, but none

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.