C# C# Basics Console I/O Variables

Am i wasting my time? kindly clarify what is wrong!

Initialize bookTitle with the title of your favorite book. Bummer! Did you set 'bookTitle' using the equals sign and a string value?
CodeChallenge.cs

1 string bookTitle; 2 bookTitle = "aaaaaaa";

CodeChallenge.cs
string bookTitle;
bookTitle = "aaaaaaa";

1 Answer

Steven Parker
Steven Parker
162,936 Points

When they say "Initialize bookTitle with the title of your favorite book.", by "initialize" they mean declare the variable and assign it at the same time (in the same statement). Your code would actually do the same job in an actual program, but it's not the form that the challenge is looking for.

Also "aaaaaaa" is probably not really the title of your favorite book. :laughing: (just kidding on this one)