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 trial

C# C# Basics (Retired) Console I/O Start Coding

error 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 aceSystem'. Are you missing an assembly reference?

Can you plz tell me what is the problem?

Andreas Gruber
Andreas Gruber
2,142 Points

Did you write this: using System; at the beginning of the code?

Where 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
Steven Parker
231,269 Points

:point_right: It looks like you misspelled "Console" by writing it "console" (lower case "c").

Remember, C# is case-sensitive.

Thank 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
Andreas Gruber
2,142 Points

hmm.. I've copied your code and it worked... strange...

probably was because you didn't save the changes after you changed it to an upper case 'C'

Karen DuVall
Karen DuVall
537 Points

I'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.