I have this code where this inline variable { (hour > 12 ? "PM" : "AM") }
I create it and it works but I am confused because without the braces ()
I have some issue with code lots of red underlines there, infect compiler code suggestions refactor it with red underlines but after wrap my expression with ()
it works.
I just want to know what is status of ()
in this interpolation inline variable?
WriteLine($"{hour}:{minout}:{seconds} { (hour > 12 ? "PM" : "AM") }");