C
C#6mo ago
Rafell

How do i put "" Inside a String?

I wrote down "
Console.WriteLine("Welcome to "Program"")
Console.WriteLine("Welcome to "Program"")
" And it simply told me theres an error. How do i fix that?
2 Replies
Jimmacle
Jimmacle6mo ago
you have to escape them, like "Welcome to \"Program\"" alternatively, you can use more quotes to start the string like """Welcome to "Program"""" in recent versions of C#
Rafell
RafellOP6mo ago
Oh interesting! Thank you Jimmacle. Or should i say. Danke Jimmacle.

Did you find this page helpful?