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. General Programming
  3. C#
  4. Replacing in .NET

Replacing in .NET

Scheduled Pinned Locked Moved C#
csharp
5 Posts 3 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.
  • D Offline
    D Offline
    Dwayner79
    wrote on last edited by
    #1

    I have a large project that early on a class was defined as "Blocks". There was grandious plans for this class, but as the project developed, "Blocks" became a place for a few constants. I would like to change this "Blocks" to "Constants", but the term "Blocks" is used EVERYWHERE in the program. The only certainty is that if I did a simple search and replace, I would screw at least 100 things up. I heard a rumor there is a smart replace for variable names/etc. I found very little info on it. Has anyone used it. Does anyone know if it will work on classes. Thanks in advance... Dwayne ***************** "We need to apply 21st-century information technology to the health care field. We need to have our medical records put on the I.T." —GW

    J 1 Reply Last reply
    0
    • D Dwayner79

      I have a large project that early on a class was defined as "Blocks". There was grandious plans for this class, but as the project developed, "Blocks" became a place for a few constants. I would like to change this "Blocks" to "Constants", but the term "Blocks" is used EVERYWHERE in the program. The only certainty is that if I did a simple search and replace, I would screw at least 100 things up. I heard a rumor there is a smart replace for variable names/etc. I found very little info on it. Has anyone used it. Does anyone know if it will work on classes. Thanks in advance... Dwayne ***************** "We need to apply 21st-century information technology to the health care field. We need to have our medical records put on the I.T." —GW

      J Offline
      J Offline
      Jon Sagara
      wrote on last edited by
      #2

      If you're using VS2005, it supports refactoring[^]. If not, there are tools available for previous versions of VS, such as this one: ReSharper[^]. I am not aware of any free tools, though truth be told I have never looked for them. Jon Sagara As you may presently yourself be fully made aware of, my grammar sucks. Sagara.org | Blog | My Articles

      D 1 Reply Last reply
      0
      • J Jon Sagara

        If you're using VS2005, it supports refactoring[^]. If not, there are tools available for previous versions of VS, such as this one: ReSharper[^]. I am not aware of any free tools, though truth be told I have never looked for them. Jon Sagara As you may presently yourself be fully made aware of, my grammar sucks. Sagara.org | Blog | My Articles

        D Offline
        D Offline
        Dwayner79
        wrote on last edited by
        #3

        Refractoring is the rumor I heard about. I am using 2003... Any thoughts on switching to 2005 mid project??? shouldn't be any issues right??? ***************** "We need to apply 21st-century information technology to the health care field. We need to have our medical records put on the I.T." —GW

        J G 2 Replies Last reply
        0
        • D Dwayner79

          Refractoring is the rumor I heard about. I am using 2003... Any thoughts on switching to 2005 mid project??? shouldn't be any issues right??? ***************** "We need to apply 21st-century information technology to the health care field. We need to have our medical records put on the I.T." —GW

          J Offline
          J Offline
          Jon Sagara
          wrote on last edited by
          #4

          It's hard to say, and only you and your team can make that call, but my gut reaction is that if you just want the refactoring, then no, don't switch mid-project. Jon Sagara As you may presently yourself be fully made aware of, my grammar sucks. Sagara.org | Blog | My Articles

          1 Reply Last reply
          0
          • D Dwayner79

            Refractoring is the rumor I heard about. I am using 2003... Any thoughts on switching to 2005 mid project??? shouldn't be any issues right??? ***************** "We need to apply 21st-century information technology to the health care field. We need to have our medical records put on the I.T." —GW

            G Offline
            G Offline
            Guffa
            wrote on last edited by
            #5

            You could use "manual refactoring". Just rename the class and compile. The list of compile errors are references to everywhere you use the class. Double click an error and you end up in the file with the name selected. Just paste in the new name. --- b { font-weight: normal; }

            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