Pur3 nicoiswoobie:It says that there isn't a definition for 'begin' and 'end'. please help :(
In C# and XNA spelling and capitalization matter. To help identify the difference, I'll use SpriteBatch. Hopefully you're somewhat familiar with it. Whenever you see bold capital S SpriteBatch, I am referring to the class that handles drawing 2D sprites in XNA. When you see italic lowecase S spriteBatch, I mean an instance variable of that class. It's critically important for you to understand the difference, if you don't than I recommend you start looking for a beginner's introduction to C# programming tutorial before diving into games.
In most of the samples, you'll find the coder has implemented SpriteBatch with a variable called spriteBatch. spriteBatch is an instance and will contain a definition of the methods Begin and End. SpriteBatch.Begin() will not compile because SpriteBatch is not an instance. You have to watch your capitalization because spriteBatch.begin() will not compile either. Only spriteBatch.Begin(); will work.
A lot of people will rename spriteBatch so that it isn't so similar to SpriteBatch. For instance, sb. Just be sure you can remember that sb stands for spriteBatch and not anything else.
IntelliSense (that box that appears when you begin writing code) will advise you about the members an object contains. If you type 'SpriteBatch.' or 'spriteBatch.' you should see IntelliSense appear with suggestions about how to finish the statement. If there are no suggestions or they aren't the suggestions you expected (such as Begin or End), you probably made a mistake and are referring to the wrong object, or to nothing at all.
Another clue that you just made a formatting error occurs when you finish a statement with the semicolon (;). When you end a statement, Visual Studio will "clean up" the statement by removing any unnecessary spaces. But it will only do this if the statement is complete, so when you're writing code try pressing space and then ; and if the space goes away then you didn't make any obvious mistakes in the syntax for that statement.
A similar clean-up happens when you close an open code block { } for instance a conditional statement or a loop. If the clean-up doesn't happen where one should than you need to stop writing code and find the errors in what you just wrote.
After correcting a mistake you just made, sometimes the program still won't compile. Be sure to build the project again to see if the errors change. You won't always see every error in the code from one build because abstract errors won't be tested until fundamental ones are resolved. The errors are extremely helpful for fixing mistakes. You can even double click on them to focus directly on the line that's causing the problem. If that's not convenient, I don't know what is!