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. Clever Code
  4. VS2003 and const

VS2003 and const

Scheduled Pinned Locked Moved Clever Code
csharpvisual-studiosaleshelplearning
5 Posts 5 Posters 2 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.
  • C Offline
    C Offline
    Chris_Green
    wrote on last edited by
    #1

    I've been cleaning up a C# project I inherited which is several years old. In it were loads of string concatinations which are called repeatedly. My simply solution was to add const to many of them (and stringbuilder for others where dynamic). Surprisingly, VS didn't only crash when I compiled the code the window just POOF!... and disappeared. This happened repeatedly and took a while for me to discover it was an extremely long const which caused the problem. I had to define 2 const and use string.format("{0} {1}", sPartA, sPartB) to make VS happy. Of course, I told the customer, this wouldn't have happened in VS2008.

    L D 2 Replies Last reply
    0
    • C Chris_Green

      I've been cleaning up a C# project I inherited which is several years old. In it were loads of string concatinations which are called repeatedly. My simply solution was to add const to many of them (and stringbuilder for others where dynamic). Surprisingly, VS didn't only crash when I compiled the code the window just POOF!... and disappeared. This happened repeatedly and took a while for me to discover it was an extremely long const which caused the problem. I had to define 2 const and use string.format("{0} {1}", sPartA, sPartB) to make VS happy. Of course, I told the customer, this wouldn't have happened in VS2008.

      L Offline
      L Offline
      leppie
      wrote on last edited by
      #2

      newkie wrote:

      Of course, I told the customer, this wouldn't have happened in VS2008.

      I have seen VS2008 performing the disappearing act a lot more often than VS2003 did.

      xacc.ide - now with TabsToSpaces support
      IronScheme - 1.0 alpha 4a out now (29 May 2008)

      P 1 Reply Last reply
      0
      • C Chris_Green

        I've been cleaning up a C# project I inherited which is several years old. In it were loads of string concatinations which are called repeatedly. My simply solution was to add const to many of them (and stringbuilder for others where dynamic). Surprisingly, VS didn't only crash when I compiled the code the window just POOF!... and disappeared. This happened repeatedly and took a while for me to discover it was an extremely long const which caused the problem. I had to define 2 const and use string.format("{0} {1}", sPartA, sPartB) to make VS happy. Of course, I told the customer, this wouldn't have happened in VS2008.

        D Offline
        D Offline
        Dan Neely
        wrote on last edited by
        #3

        newkie wrote:

        Of course, I told the customer, this wouldn't have happened in VS2008. Quote Selected Text

        Is this true or were you just blowing smoke to try and get new software?

        Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots. -- Robert Royall

        1 Reply Last reply
        0
        • L leppie

          newkie wrote:

          Of course, I told the customer, this wouldn't have happened in VS2008.

          I have seen VS2008 performing the disappearing act a lot more often than VS2003 did.

          xacc.ide - now with TabsToSpaces support
          IronScheme - 1.0 alpha 4a out now (29 May 2008)

          P Offline
          P Offline
          Paul Conrad
          wrote on last edited by
          #4

          leppie wrote:

          VS2008 performing the disappearing act

          I've seen some odd stuff, but no disappearing acts yet. I probably just jinxed myself now :rolleyes:

          "The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon

          K 1 Reply Last reply
          0
          • P Paul Conrad

            leppie wrote:

            VS2008 performing the disappearing act

            I've seen some odd stuff, but no disappearing acts yet. I probably just jinxed myself now :rolleyes:

            "The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon

            K Offline
            K Offline
            Kevin McFarlane
            wrote on last edited by
            #5

            It's happened to me with VS 2005 a few times.

            Kevin

            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