FAQ: Data Types and Variables - Review

This community-built FAQ covers the “Review” exercise from the lesson "Data Types and Variables ".

Paths and Courses
This exercise can be found in the following Codecademy content:

Learn C#

FAQs on the exercise Review

There are currently no frequently asked questions associated with this exercise – that’s where you come in! You can contribute to this section by offering your own questions, answers, or clarifications on this exercise. Ask or answer a question by clicking reply (reply) below.

If you’ve had an “aha” moment about the concepts, formatting, syntax, or anything else with this exercise, consider sharing those insights! Teaching others and answering their questions is one of the best ways to learn and stay sharp.

Join the Discussion. Help a fellow learner on their journey.

Ask or answer a question about this exercise by clicking reply (reply) below!

Agree with a comment or answer? Like (like) to up-vote the contribution!

Need broader help or resources? Head here.

Looking for motivation to keep learning? Join our wider discussions.

Learn more about how to use this guide.

Found a bug? Report it!

Have a question about your account or billing? Reach out to our customer support team!

None of the above? Find out where to ask other questions here!

I tried to be a good student and do the extra homework from that page. One of them:

  • Changes a string to a list of chars

So apparently that can’t be done implicitly or explicitly and one must use function to do so. ToCharArray, I think, should be the function but “it does not exist in the current context”.

Let me know if I am wrong and I am missing something,

1 Like

Please post a link to this exercise. Thanks.

Here it is:


There is something here about converting char to string…


Can’t be much help as this is my first foray into C#.

Can you post the code that you tried?

Implicit conversion:
string myTest = “Test”;
char myTestSpelling = myTest;

Explicit conversion:
string myTest = “Test”;
char myTestSpelling = (char)myTest

Using the Convert function:
string myTest = “Test”;
char myTestSpelling = Convert.ToChar(myTest);

Using the online-found function
char myTestSpelling = myTest.ToCharArray();

None of these work.

This should have worked:

string myTest = "Test";
char[] myTestSpelling = myTest.ToCharArray();

Did you get an error message with the ToCharArray()? If not, try this below it:

foreach(char myChar in myTestSpelling) {

Should output:


Uh, this time around it did work. I probably had a typo, how embarrassing.

I must say, even for an extra homework, this one was particularly difficult.
Thanks for the help.


Am I missing something here? The tutorial went from converting data types in the given sheet to suddenly requiring for loops and “lists” which haven’t been covered yet?


The structure of this particular CodeAcademy class is very poor. It’s about a that lesson I started considering learning elsewhere.


I agree this “csharp-data-types-variables” lesson has been written quite poorly.
We were never taught how to deal with Lists, and yet they expect from us to do that (“Convert a string to a list of characters”).

Thank you @shintenpu for posting a solution. This worked perfectly!

char[] myTestSpelling = myTest.ToCharArray();
1 Like

Add me to the list of users who got confused here. It could have at least mentioned that we’d need to look up how to do Arrays etc.

Technically, and the way I understood the assignment, we are instructed to “Change a string to a list of chars”. A list of characters would be formatted as below and not as an array of characters. With that in mind, the following should have worked and didn’t. So not only is the lesson structured poorly, but in this case, the instructions were as well.

            string myTest = "Test";
            List<char> myTestSpelling = new List<char>();

How do I open the terminal in the ‘Review’ exercise, to practise some code?

  string fede = "Valverde";
  char[] n = new char[8];
  char a;
  ramos_1 = Convert.ToString(ramos);
         n = fede.ToCharArray();

for (int i =0; i <8; i++)

Wow…that was a bit much, CodeAcademy. Talk about being thrown into the deep end…