-
Hi, is it possible to use cond or choose to check whether two values are the same?
It seems that Fiddle: https://dotnetfiddle.net/08nHRw |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @mhspelt A fix could format with an additional parameter with equality: Evaluating A PR for allowing |
Beta Was this translation helpful? Give feedback.
Hi @mhspelt
Yes, you are right, the comparison currently requires a literal. A placeholder does not work.
A fix could format with an additional parameter with equality:
Fiddle: https://dotnetfiddle.net/OjHoRj
Did you find a better solution?
Evaluating
Placeholder
s would be a nice improvement, though. TheFormat
from theParser
already returns allPlaceholder
s. TheConditionalFormatter
however assumes that childFormat
s in the parameters are not nested. It should rather make sure and throw for nested parameters.A PR for allowing
Placeholder
s would be great ;-)