Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialroee almog
579 Pointserror cs0234
This is my code:
class Program { static void Main() { System.Console.Write("Enter how many minutes you exercised: ");
}
} This is the error:
Program.cs(6,16): error CS0234: The type or namespace name console' does not exist in the namesp
ace
System'. Are you missing an assembly reference?
Can you plz tell me what is the problem?
roee almog
579 PointsWhere should i write it? He doesn't write it in the movie This is my full code: class Program
{ static void Main() { System.console.Write("Enter how many minutes you exercised: ");
}
}
5 Answers
Steven Parker
231,210 PointsIt looks like you misspelled "Console" by writing it "console" (lower case "c").
Remember, C# is case-sensitive.
roee almog
579 PointsThank you for ur time!!! I changed it to C but it doesn't help. this is the code now. plz find the problem!!!!
class Program
{ static void Main() { System.Console.Write("Enter how many minutes you exercised: ");
}
} the error is writing "console" even if i write Console... BTW the error is still the same...
Andreas Gruber
2,142 Pointshmm.. I've copied your code and it worked... strange...
Andrew Perry
5,266 Pointsprobably was because you didn't save the changes after you changed it to an upper case 'C'
Karen DuVall
537 PointsI'm getting the same error message. I've been trying to figure out the problem and have tried re-writing it several times. Still the same problem.
Andreas Gruber
2,142 PointsAndreas Gruber
2,142 PointsDid you write this: using System; at the beginning of the code?