Вопрос

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