Thread: C# Help

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2013
    Location
    Australia
    Posts
    24
    Rep Power
    0

    C# Help


    I've only just started C# programming and have already hit a snag that I don't understand, here it is:
    Code:
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    
    namespace TestGame
    {
        public class Globals
        {
            public static ContentManager Content;
            public static GraphicsDeviceManager Graphics;
            public static SpriteBatch spriteBatch;
            public static GameTime gameTime;
            public static bool WindowFocused;
            public static Vector2 GameSize;
            public static RenderTarget2D BackBuffer;
        }
    }
    the namespaces/fields ContentManager, GraphicsDeviceManager, SpriteBatch, GameTime, Vector2 and RenderTarget2D have become errors for some reason. Will I have to change them? Any help is much appreciated.
  2. #2
  3. Contributed User
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jun 2005
    Posts
    4,379
    Rep Power
    1871
    > the namespaces/fields ContentManager, GraphicsDeviceManager, SpriteBatch, GameTime, Vector2 and RenderTarget2D have become errors for some reason
    And what are those errors?

    Please edit your post and put [code][/code] tags around your code.
    Copy again from your code editor so indentation is preserved.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper

IMN logo majestic logo threadwatch logo seochat tools logo