I would like to do some condition formatting of strings. I know that you can do some conditional formatting of integers and floats as follows:
Int32 i = 0;
Just don't. I have no idea what are both the items and values in your code, but I believe, this pair could be treated as an entity of some kind. Define this entity as a class and override its ToString()
method to return whatever you want. There's absolutely nothing wrong with having if
for deciding how to format this string depending on some context.