title: How to access a list in another class in C#
body: <p>I'm incredibly new to C#, so please ignore my ignorance with this question. But I've searched online and can't find a solution that makes sense.</p>
  
  <p>Basically, I have a list being stored in a CommonClass.CS, as below:</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  
  namespace NewParkingApp
  {
      public class CommonClass
      {
          public List &lt; string &gt; itemData = new List &lt; string &gt; ()  
              {  
                  "Android",  
                  "IOS",  
                  "Windows Phone",  
                  "Xamarin-IOS",  
                  "Xamarin-Form",  
                  "Xamarin_Android"  
              };  
  
      }
  }
  </code></pre>
  
  <p>From another class, I'd then like to be able to access that list. This is what I have so far for the accessing class:</p>
  
  <pre><code>using Foundation;
  using System;
  using System.Collections.Generic;
  using UIKit;
  
  namespace NewParkingApp
  {
      public partial class ResultViewController : UIViewController
      {
          public ResultViewController (IntPtr handle) : base (handle)
          {
          }
  
          public override void ViewDidLoad()
          {
              base.ViewDidLoad();
              List&lt;string&gt; itemData = CommonClass.itemData;
              mainListview.Source = new TableViewSource(itemData);  
          }
  
          public override void DidReceiveMemoryWarning()
          {
              base.DidReceiveMemoryWarning();
              // Release any cached data, images, etc that aren't in use.
          }
      }
  }
  </code></pre>
  
  <p>As an addition, it would also be useful to know how to add items to that list. But I'm guessing that should be pretty easy once I know how to access it?</p>
  
  <p>Thanks in advance!</p>