VS2003 and const
-
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.
-
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.
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) -
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.
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
-
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)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
-
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
It's happened to me with VS 2005 a few times.
Kevin