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?
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.