Bizarre ternary operator behavior in debugger on x64 platform

前端 未结 2 1961
日久生厌
日久生厌 2021-01-17 13:03

I\'m using a very simple ternary expression in my C# code:

helperClass.SomeData = helperClass.HasData ? GetSomeData() : GetSomeOtherData();

2条回答
  •  遇见更好的自我
    2021-01-17 13:50

    Taking Eric Lippert's advice that this is probably a bug, I've filed an official Connect bug for this issue: https://connect.microsoft.com/VisualStudio/feedback/details/684202

    Thanks everyone for your feedback!

    UPDATE: They got back to me and said they've fixed this corner case in the next version of the compiler. Hooray! :)

提交回复
热议问题