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 trialinnocent sibanda
770 Pointshow do i declare a string variable
how do i declare a string variable
class program
{
static void Main()
{
System.Console.Readline();
string bookTitle:
}
}
1 Answer
andren
28,558 PointsFor the basic challenges they don't want you to include any boilerplate code like creating a class and the like, that is done for you automatically.
The only code you need to type is the exact thing the challenge asks for. So for this task the code for declaring the bookTitle
variable is the only line of code you need. Like this:
string bookTitle;
The above code is the only line of code needed to complete the first task of this challenge.
Seth Kroger
56,413 PointsI'd also point out that she ended her line with with the incorrect punctuation, a colon instead of a semi-colon.
innocent sibanda
770 Pointsinnocent sibanda
770 Pointsi have trying to declare a string variable and im stuck. can someone help