Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

C#

Tirth Upadhyay
Tirth Upadhyay
920 Points

What does " string FirstName = "Jeremy" " do?

What does " string FirstName = "Jeremy" " do? Does it display something on console? Like "Enter how many minutes you exercised?" or it allows user to give information like name to program? if yes, what does "Jeremy" word signifies?

2 Answers

Lukas Muller
Lukas Muller
7,347 Points

It says that the variable FirstName of type String that has the word "Jeremy". Now you can change the variables value or you can simply call it to display it somewhere. Right now it 'doesn't do anything', but hold the value.

jason chan
jason chan
31,009 Points

it stored the string in the variable FirstName in memory so you can use it else where. If not it goes poof.