Answer Overflow Logo
Change Theme
Search Answer Overflow
GitHub
Add Your Server
Login
Home
Popular
Topics
Gaming
Programming
Nonethousand
Posts
Comments
C
C#
•
Created by Nonethousand on 3/1/2023 in
#help
✅ use one string if a condition is true, else use another string
Sorry if the title is unclear but is there something like python's
foo
=
"hello"
if
condition
else
"world"
foo
=
"hello"
if
condition
else
"world"
(This is not how I'm actually going to use it, it's just an example) But for c#? Or will I just have to do something like set a variable beforehand?
5 replies