Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8732781
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T09:30:08+00:00 2026-06-13T09:30:08+00:00

I’m getting started with C# and XNA. All I’m trying to do right now

  • 0

I’m getting started with C# and XNA. All I’m trying to do right now is figure out how to split up the game’s code between multiple classes instead of just cramming it all into a single one.

I think I’ve managed to get everything else working right now, but I cannot for the life of me figure this out. I’ve done about two hours of browsing for the answer to this, and only ended up so much more frustrated as I seem to be having a different kind of problem.

The error is: “An object reference is required for the non-static field, method, or property Summoner_Quest.TextControl.Draw()“

My Game1 class can be viewed here: http://pastebin.com/Wq9S1sFu

My TextControl class can be viewed here: http://pastebin.com/49fSSm27

Some of the answers I’ve seen involved changing a method from static to non-static or vice-versa. Making my TextControl method static is the closest I’ve gotten to “fixing” it, but then the compiler yells at me until I remove about half the code within the method. But I’m pretty certain that’s not the solution I’m looking for.

Thank you for taking the time to read my post. Any help would be greatly appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T09:30:09+00:00Added an answer on June 13, 2026 at 9:30 am

    You need to create an instance of your TextControl class. So somethinglike.

    protected override void Draw(GameTime gameTime)
    {

            GraphicsDevice.Clear(Color.CornflowerBlue);
    
    
    
            // TODO: Add your drawing code here
    
            TextControl textControl = new TextControl();  //Creating the text control
            textControl.Draw();
    
    
            base.Draw(gameTime);
    
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
I have a jquery bug and I've been looking for hours now, I can't
I have this code to decode numeric html entities to the UTF8 equivalent character.
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.