I came across a bug in code that is only reproduced when the code is built with optimizations enabled. I\'ve made a console app that replicates the logic for testing (code
value == new string[0]
The above looks like a weird statement to me. You are comparing two string arrays with an equals statement. That will only result in true if they both point to the same array, which is quite unlikely. This doesn't explain yet why this code behaves differently in an optimized version.