Look at your code, and I'll simplify it a little:
prompt.ShowDialog() == DialogResult.OK ? textBox.Text : "";
CallMyMethod() == 0 ? "A" : "B";
That isn't a usable statement, because it "returns" one of two strings, but it does nothing with it! The system looks at that and goes 'What am I supposed to do with "A" or "B"? I have nowhere to put them!'
You need an assignment to make that work:
string result = CallMyMethod() == 0 ? "A" : "B";
Gives it somewhere to store the result, so that'll compile.
So perhaps try:
string result = prompt.ShowDialog() == DialogResult.OK ? textBox.Text : "";