Search
Setup for Free
C
C#
•
4y ago
superman
How to combine null coascence and ternary operator?
Hello
, I have a string variable A
. And I want to fill thid string A with value Yes if a bool is true
, No if bool is false and empty string if bool is null
, how do I do this in 1 line
C#
Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,129
Members
View on Discord
Similar Threads
Was this page helpful?
Yes
No
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Similar Threads
✅ Possible bug in ternary operator when incrementing in razorpages?
C
C# / help
2y ago
How to combine images?
C
C# / help
2y ago
✅ ? operator and property assigned to =null! meaning in EF core database context
C
C# / help
10mo ago
❔ => operator
C
C# / help
3y ago