Having problem running this C# code... Can i know where the problem is | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Having problem running this C# code... Can i know where the problem is

using System; namespace Project { class MyClass { public static void Main(string[] args) { var string1 = robot; Console.WriteLine("Ask for my name, user"); Console.ReadKey(); Console.WriteLine("My name is..." + string1); Console.WriteLine("Press Enter to continue"); Console.ReadKey(); Console.WriteLine("Thanks for trying."); } } }

4th Oct 2021, 2:20 PM
omitogun toni
omitogun toni - avatar
3 Answers
+ 3
Line 6. robot should be in the quotation marks, just like: "robot" (no idea why you need that "robot" there, but alright.. ) Here is a fixed version of your code : https://code.sololearn.com/ciiPIrHNTyl0/?ref=app
4th Oct 2021, 2:24 PM
Aleksei Radchenkov
Aleksei Radchenkov - avatar
4th Oct 2021, 2:28 PM
omitogun toni
omitogun toni - avatar
+ 2
omitogun toni, No problem buddy 👍 And happy learning!
4th Oct 2021, 2:29 PM
Aleksei Radchenkov
Aleksei Radchenkov - avatar