c# - Visual Studio debugger behaves incorrectly on .Any() in if statement -


when debug code in visual studio 2015/2017 debugger steps if statement. why that? code doesn't seem execute though.

private static async task test() {     var somethingasync = await task.fromresult(0);      var list = enumerable.empty<object>();      if (list.any())         ;   // line reached debugger (but not executed) } 

if put additional code after if line not reached.

private static async task test() {     var list = enumerable.empty<object>();      if (list.any())         ;   // line not reached      var foo = "bar"; } 

if assign list.any() variable , check variable, line isn't reached:

private static async task test() {     var list = enumerable.empty<object>();      var haselements = list.any();      if (haselements)         ;   // not reach line      if (list.any())         ;   // line reached     } 

the issue occurs when method async.


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -