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 () 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 () below!
Agree with a comment or answer? Like () to up-vote the contribution!
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,
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?
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!
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>();
myTestSpelling.AddRange(myTest);
I’m practicing/doing some hw and I’m currently working on the exercise “Converts a boolean to a string”
I am not sure if my code is proper; I was hoping someone could chime in. The reason why I’m not sure/confident is NOT because I get an error BUT because the boolean variable converted into a String (true) is coming up on the terminal as “True” (Capital T). I thought if it was converted to a string it would show all in lowercase. Am I over thinking/looking too hard or is there a mistake on the code?