I am hoping to use a "{" inside a string interpolation statement but I'm having trouble finding the escape character to do it.
var val = "ERROR_STATE"; var str = $"if(inErrorState){ send 1,\"{val}\" }" Desired output:
if(inErrorState){send 1,"ERROR_STATE"} The simple solution is to just not use string interpolation, but I think this way of doing it is easier to read.