質問

I am making a program that makes pre-formatted citations based off of user input data. This should be fairly easy and it has been for the most part but the last line is giving me some error messages that I don't know how to fix.

Console.Out.WriteLine ("Here's your citation: "+ lastname ", " + firstname ". ");

Gives me this error message.

Unexpected symbol `,'
Only assignment, call, increment, decrement, and new object expressions can be used as a statement

I know that it's the punctuation in the quotes that is causing the issue but I need to be able to print those in order for this program to be useful at all. How can I fix this?

役に立ちましたか?

解決

Try this.

Console.Out.WriteLine ("Here's your citation: "+ lastname + ", " + firstname + ". ");
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top