Pergunta

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?

Foi útil?

Solução

Try this.

Console.Out.WriteLine ("Here's your citation: "+ lastname + ", " + firstname + ". ");
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top