C# Foundations · Lesson 4

Strings

Text lives in quotes. A name without quotes is a variable.

How it works

"Ada" is text. name is a variable that holds that text. Joining "Hello, " and name builds one string, Hello, Ada. Quotes wrap text. They do not wrap the variable you want to read.

A working example

var name = "Ada";
Console.WriteLine("Hello, " + name);

Expected output

Hello, Ada
Try this
Quotes wrap text, not names.