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 Receiving Input

I Keep on getting this error.

I am trying to compile my script but I keep on getting this error:

Program.cs(8,7): error CS0246: The type or namespace name String' could not be found. Are you missingSystem' using directive?

I made sure there is nothing wrong because I copied the instructors code and pasted it and the error still came up. What can I do to fix this?

Avan Sharma
Avan Sharma
7,652 Points

I guess it should be just string.

Steven Parker
Steven Parker
231,248 Points

2 Answers

Steven Parker
Steven Parker
231,248 Points

Without seeing your code I have to guess, but I have two of them:

  • you forgot to put "using System;" at the top of your source
  • you spelled "String" with a capital "S" where it should be "string".

Oh hold on now its starting to work. I think it was the fact that I put a capital S. Thanks