Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problems with C#
#13
Haseo Wrote:Sorry to bother you guys again, but I have no idea what borked up this time. I didn't even edit the file that the error turned up in!

The error underlines 'Game1' in both instances which they appear. Was I somehow so noobish that I managed to destroy the code without even touching it? My other program name is 'Game1.cs', just thought I ought to mention that I didn't rename it.

The errors say the same thing: 'The type or namespace name 'Game1' could not be found (are you missing a directive or an assembly reference?'
What's the name of your project? The 'namespace' has to be the same as your project, if it isn't, it throws that error at you.

Haseo Wrote:Also, how do I exit a project without having to exit the entire microsoft visual c# window and re-opening it?
I'm using Visual Studio, pretty sure these things are the same. In the Solution Explorer panel, right click on the project name, select 'Unload Project'. Or go to Project > Unload Project. Right click on it and select 'Reload Project' to re-open it.

For errors, what I do is copy the text that doesn't vary, put in quotes and Google it. Most of the time, other people have had this problem and there are already answers. The last error you mention is telling you what it is and how to possibly fix it, it's in plain English.

Really, though, if you've never programmed before, go start with some basic C++ or Java, hell, even basic C# if you're just interested in that. Start with stuff where you just display text, sums, multiplications, etc. Then, after you've understood what the hell is going on in code, ready stuff like this will be easier and you'll be able to see where pomegranate went wrong, what caused it and how to fix it. Avoid copying and pasting code, if you're going to do that, at least type it out yourself so that you can at least practice coding and start developing some good habits.

Fundamentals. Can't build a sturdy house without laying out a solid foundation.
Reply


Messages In This Thread
Problems with C# - by Haseo - 2011-09-24, 03:32 PM
Problems with C# - by Spaz - 2011-09-24, 04:49 PM
Problems with C# - by Haseo - 2011-09-29, 06:43 AM
Problems with C# - by Katforks - 2011-09-29, 11:58 AM
Problems with C# - by Spaz - 2011-09-29, 05:54 PM
Problems with C# - by Heidi - 2011-09-29, 06:15 PM
Problems with C# - by Haseo - 2011-09-30, 01:02 PM
Problems with C# - by Nikkey - 2011-09-30, 01:23 PM
Problems with C# - by Heidi - 2011-09-30, 06:43 PM
Problems with C# - by Haseo - 2011-10-14, 08:28 PM
Problems with C# - by OB3LISK - 2011-10-14, 09:16 PM
Problems with C# - by Heidi - 2011-10-14, 09:49 PM
Problems with C# - by Loose - 2011-10-14, 10:39 PM
Problems with C# - by Spaz - 2011-10-14, 11:39 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)