Last active
August 29, 2015 14:27
-
-
Save mstrobel/7a272d8709c8c4380e98 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace ReSharperBugs | |
{ | |
internal class Program | |
{ | |
private static void Main() | |
{ | |
var sideEffectOccurred = false; | |
try | |
{ | |
// | |
// 1. Run and note the result (sideEffectOccurred = true). | |
// 2. Apply "Use string interpolation" quick fix. | |
// 3. Run again, note that the result changes (sideEffectOccurred = false). | |
// | |
Console.WriteLine( | |
string.Format( | |
"{0:BadFormat}: " + | |
"{1}", | |
Guid.Empty, | |
sideEffectOccurred = true)); | |
} | |
catch {} | |
finally | |
{ | |
Console.WriteLine("sideEffectOccurred: {0}", sideEffectOccurred); | |
Console.ReadLine(); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment