Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

I agree that reusing variable is more often than not a code smell. Probably such code should be refactored in smaller, self-contained, blocks.

There is one particular scenario, OTOH, in C#, when they tend to popup - that is when using switch-case constructs. Situation is very nicely explained in: C# Switch statement with/without curly brackets… what's the difference?C# Switch statement with/without curly brackets… what's the difference?

I agree that reusing variable is more often than not a code smell. Probably such code should be refactored in smaller, self-contained, blocks.

There is one particular scenario, OTOH, in C#, when they tend to popup - that is when using switch-case constructs. Situation is very nicely explained in: C# Switch statement with/without curly brackets… what's the difference?

I agree that reusing variable is more often than not a code smell. Probably such code should be refactored in smaller, self-contained, blocks.

There is one particular scenario, OTOH, in C#, when they tend to popup - that is when using switch-case constructs. Situation is very nicely explained in: C# Switch statement with/without curly brackets… what's the difference?

Nice link name.
Source Link
user40980
user40980

I agree that reusing variable is more often than not a code smell. Probably such code should be refactored in smaller, self-contained, blocks.

There is one particular scenario, OTOH, in C#, when they tend to popup - that is when using switch-case constructs. Situation is very nicely explained in:

   http://stackoverflow.com/questions/3652408C# Switch statement with/c-sharp-switch-statement-with-without-curly-brackets-whats-the-difference curly brackets… what's the difference?

I agree that reusing variable is more often than not a code smell. Probably such code should be refactored in smaller, self-contained, blocks.

There is one particular scenario, OTOH, in C#, when they tend to popup - that is when using switch-case constructs. Situation is very nicely explained in:

 http://stackoverflow.com/questions/3652408/c-sharp-switch-statement-with-without-curly-brackets-whats-the-difference

I agree that reusing variable is more often than not a code smell. Probably such code should be refactored in smaller, self-contained, blocks.

There is one particular scenario, OTOH, in C#, when they tend to popup - that is when using switch-case constructs. Situation is very nicely explained in:  C# Switch statement with/without curly brackets… what's the difference?

Source Link

I agree that reusing variable is more often than not a code smell. Probably such code should be refactored in smaller, self-contained, blocks.

There is one particular scenario, OTOH, in C#, when they tend to popup - that is when using switch-case constructs. Situation is very nicely explained in:

http://stackoverflow.com/questions/3652408/c-sharp-switch-statement-with-without-curly-brackets-whats-the-difference