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 7940543
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T23:25:15+00:00 2026-06-03T23:25:15+00:00

I never liked implicit operators (prefer extension methods) because it is hard to see

  • 0

I never liked implicit operators (prefer extension methods) because it is hard to see visually when that cast/conversion happens in the code.

Imagine if you have example like below:

public static implicit operator Deal(string dealAsXml)
{
    //convert the xml into Deal object
}

Above implicit operator helps you to cast/convert deal in Xml format into Deal Object.

Usually when you right click on a method, you can use “Find Usages” (or Alt+F7) on it, which is quite helpful, is there anything similar for implicit operators ?

I think that’s another reason to use the Extensions methods where possible.

  • 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-03T23:25:17+00:00Added an answer on June 3, 2026 at 11:25 pm

    EDIT FROM THE FUTURE: Current versions of Visual Studio let you right-click "Find All References" on implicit operators. Right click on the conversion type (Deal in this example) or operator symbol (+, -, *, /, etc.) to access the "Find All References" command. So the below advice is now [Obsolete]


    Maybe something like Resharper can do it, but I’m not sure. When I need to find usages, I do it the poor-man’s way and remove the implicit operator, recompile and find the errors.

    I suppose theoretically the compiler might then miss a case if it can use a different implicit operator (or switch to an "object" type overload of a method), but it tends to work for my usages. I’m sure there’s a better solution, but it’s worked for me so far.

    EDIT: Just had a thought and tested it. Marking your implicit operator as [Obsolete] will actually result in a compiler warning wherever you use it! I suppose this will catch those corner cases where there are other valid overloads that you’d miss having removed the implicit operator altogether.

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

Sidebar

Related Questions

Personally, I've never liked the MyObject naming of classes. I would guess that the
I've been reading about OOP in C but I never liked how you can't
I ran into something that I never thought of before and it stumped me.
jQuery's deferred's have never liked me, and I've never been fully able to understand
What are general guidelines on when user-defined implicit conversion could, should, or should not
I never liked components for winsock programming,I loved it in its natural way,but today
I've run into this issue quite a few times and never liked the solution
I'm a Java developer looking to learn some C#/ASP.NET. One thing I've never liked
I'm trying to use my own function (never liked $(document).ready() ) to dynamically load
I never liked XML, and always tried to avoid it. And the day finally

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.