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