Skip to content

Check if evaluated values are the same #249

Answered by axunonb
mhspelt asked this question in Q&A
Discussion options

You must be logged in to vote

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 Placeholders would be a nice improvement, though. The Format from the Parseralready returns all Placeholders. The ConditionalFormatter however assumes that child Formats in the parameters are not nested. It should rather make sure and throw for nested parameters.

A PR for allowing Placeholders would be great ;-)

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@mhspelt
Comment options

@axunonb
Comment options

Answer selected by axunonb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
2 participants