title: How do I allow access to a variable in one class to another without using 'static' or passing it as a parameter?
body: <p>I always have a lot of problems using static variables, so I want to avoid it.</p>
  
  <p>I am making a game using SFML.net and C#, and wish to load all the textures during the Game's Initialize method. Then when a Character is created, I want the Character to do something simple like...</p>
  
  <pre><code>Image IdleAnimation = Game.IdleAnimation1;
  </code></pre>
  
  <p>Here are the classes involved: main.cs, Game.cs &amp; Init.cs</p>
  
  <p>-</p>
  
  <p>main.cs</p>
  
  <pre><code>static class main
  {
      static void Main()
      {
          Game game = new Game();
          game.Run();
      }
  }
  </code></pre>
  
  <p>-</p>
  
  <p>Game.cs</p>
  
  <pre><code> public partial class Game
  {
      public void Run()
      {
          Init();
  </code></pre>
  
  <p>-</p>
  
  <p>Init.cs</p>
  
  <pre><code>public partial class Game
  {
      public Image IdleAnimation { get; set; }
  
      private void Init()
      {
          IdleAnimation = new Image("Filepath\\filepath\\filpath");
      }
  </code></pre>
  
  <p>-</p>
  
  <pre><code>class Character : IGameObject
  {
      Image CharacterIdleAnimation;
  
      public Character()
      {
         CharacterIdleAnimation = Game.IdleAnimation;
      }
  </code></pre>
  
  <p>But I get the error: An object reference is required for the non-static field, method, or property 'Game.IdleAnimation.get'</p>