I have an issue with slide 2/7 from the MethodOutput lesson. https://www.codecademy.com/courses/learn-c-sharp/lessons/csharp-method-output/exercises/return
So I wrote the code (attached below), and all the instructions boxes are ticked, but the console still produces an error, as following:
“Program.cs(9,14): error CS0029: Cannot implicitly convert type ‘void’ to ‘string’ [/home/ccuser/workspace/csharp-return/c-sharp-hello-world-run-some-c-sharp.csproj]”
Here’s my code (hope it loads the picture):
So I don’t understand two things - Firstly, why does it throw an error in the first place? Secondly, why this course (and it’s not the first time, just got fed up with it after few times) lets me progress and ticks all the boxes even though I can’t get the result? If I’m not mistaken it lets me progress even though I didn’t get it all right and without explaining the issue, because this slide doesn’t contain the solution button, which helped me understand my mistakes previously when the same kind of thing happen.
If anyone would be kind enough to help I’d really appreciate that.