c# - Inline Lambda Expression in Watch Window -


i need write custom lambda expressions during debugging.

as example:

(new func<int, string>(x => $"{commandparameters[x].parametername} : {commandparameters[x].value}"))(2)

or shorter one:

(new func<int, string>(x => x.tostring()))(2)

or

((func<int, string>)(x => x.tostring()))(2)

i'd know simplest form can write such expressions can evaluated in watch window.

omitting func construction have (x => x.tostring())(2) more readable won't evaulated due cs0149: method name expected

lovely candidates:

  • (x => x.tostring())(2)
  • ((int x) => x.tostring())(2)


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -