title: Getting data from a method in another class
body: <p>I am pretty much confused.</p>
  
  <p>I am trying to make an program where I want to keep my .cs file with layout clean and not messy.</p>
  
  <p>So I made a seperate .cs file for all of the background work, such as fetching data from the internet.</p>
  
  <p>My viewcontroller is called "test_spaceViewController.cs" and the file where I want my class with all methods is called "test_functions.cs".</p>
  
  <p>It runs just fine and my console outputs "Data loaded" as it should, however I aint got a clue on how to fetch the string "hi".</p>
  
  <p>My "test_functions.cs" does look like this:</p>
  
  <pre><code>using System;
  
  namespace test_space
  {
      public class functions
      {
  
          public void getData()
          {
              Console.WriteLine ("Data loaded");
  
  
              string hi;
  
              hi = "Hello";
  
          }
      }
  }
  </code></pre>
  
  <p>And my "test_spaceViewController.cs"</p>
  
  <pre><code>using System;
  using System.Drawing;
  
  using MonoTouch.Foundation;
  using MonoTouch.UIKit;
  
  namespace test_space
  {
      public partial class test_spaceViewController : UIViewController
      {
  
          public test_spaceViewController (IntPtr handle) : base (handle)
          {
          }
  
          #region View lifecycle
  
          public override void ViewDidLoad ()
          {
              base.ViewDidLoad ();
  
  
              functions functions = new functions ();
              functions.getData ();
  
  
          }
  
          #endregion
      }
  }
  </code></pre>