Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. The Weird and The Wonderful
  4. Resharper not as Sharp as Usual

Resharper not as Sharp as Usual

Scheduled Pinned Locked Moved The Weird and The Wonderful
questioncode-review
7 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Rob Grainger
    wrote on last edited by
    #1

    In the following chunk of code:

    service.SetClosingResultOfAtePolicy(this, terminationType);

    The suggestion was "Add argument name 'terminationType' (Alt+Enter)", yielding:

    service.SetClosingResultOfAtePolicy(this, terminationType: terminationType);

    Because that really helps improve clarity, right?

    "If you don't fail at least 90 percent of the time, you're not aiming high enough." Alan Kay.

    Kornfeld Eliyahu PeterK L Richard DeemingR 3 Replies Last reply
    0
    • R Rob Grainger

      In the following chunk of code:

      service.SetClosingResultOfAtePolicy(this, terminationType);

      The suggestion was "Add argument name 'terminationType' (Alt+Enter)", yielding:

      service.SetClosingResultOfAtePolicy(this, terminationType: terminationType);

      Because that really helps improve clarity, right?

      "If you don't fail at least 90 percent of the time, you're not aiming high enough." Alan Kay.

      Kornfeld Eliyahu PeterK Offline
      Kornfeld Eliyahu PeterK Offline
      Kornfeld Eliyahu Peter
      wrote on last edited by
      #2

      But of course! Not it is twice as clear as was before!

      Skipper: We'll fix it. Alex: Fix it? How you gonna fix this? Skipper: Grit, spit and a whole lotta duct tape.

      "It never ceases to amaze me that a spacecraft launched in 1977 can be fixed remotely from Earth." ― Brian Cox

      1 Reply Last reply
      0
      • R Rob Grainger

        In the following chunk of code:

        service.SetClosingResultOfAtePolicy(this, terminationType);

        The suggestion was "Add argument name 'terminationType' (Alt+Enter)", yielding:

        service.SetClosingResultOfAtePolicy(this, terminationType: terminationType);

        Because that really helps improve clarity, right?

        "If you don't fail at least 90 percent of the time, you're not aiming high enough." Alan Kay.

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        What's the full signature of SetClosingResultOfAtePolicy(...) though?

        How do you know so much about swallows? Well, you have to know these things when you're a king, you know.

        R 1 Reply Last reply
        0
        • L Lost User

          What's the full signature of SetClosingResultOfAtePolicy(...) though?

          How do you know so much about swallows? Well, you have to know these things when you're a king, you know.

          R Offline
          R Offline
          Rob Grainger
          wrote on last edited by
          #4

          Er, not sure how that is relevant, but...

          public void SetClosingResultOfAtePolicy(AtePolicy policy, TerminationType terminationType)

          "If you don't fail at least 90 percent of the time, you're not aiming high enough." Alan Kay.

          L 1 Reply Last reply
          0
          • R Rob Grainger

            Er, not sure how that is relevant, but...

            public void SetClosingResultOfAtePolicy(AtePolicy policy, TerminationType terminationType)

            "If you don't fail at least 90 percent of the time, you're not aiming high enough." Alan Kay.

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #5

            It's relevant if you have optional parameters ;P In this case though, it looks like overkill.

            How do you know so much about swallows? Well, you have to know these things when you're a king, you know.

            1 Reply Last reply
            0
            • R Rob Grainger

              In the following chunk of code:

              service.SetClosingResultOfAtePolicy(this, terminationType);

              The suggestion was "Add argument name 'terminationType' (Alt+Enter)", yielding:

              service.SetClosingResultOfAtePolicy(this, terminationType: terminationType);

              Because that really helps improve clarity, right?

              "If you don't fail at least 90 percent of the time, you're not aiming high enough." Alan Kay.

              Richard DeemingR Offline
              Richard DeemingR Offline
              Richard Deeming
              wrote on last edited by
              #6

              Was that a suggestion, or just a context action? If you hit Alt+Enter, R# will usually list everything you might want to do with the code under the cursor. That doesn't necessarily mean it thinks you should do it. :)


              "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

              "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

              R 1 Reply Last reply
              0
              • Richard DeemingR Richard Deeming

                Was that a suggestion, or just a context action? If you hit Alt+Enter, R# will usually list everything you might want to do with the code under the cursor. That doesn't necessarily mean it thinks you should do it. :)


                "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

                R Offline
                R Offline
                Rob Grainger
                wrote on last edited by
                #7

                I wouldn't mind, but it consistently puts up a squiggly line under the code, and I've conditioned myself to treat those as warnings - i.e. something to be eliminated.

                "If you don't fail at least 90 percent of the time, you're not aiming high enough." Alan Kay.

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups