title: C# Declare a Static List
body: <p>I am using a Static List to store some values, the idea is declare the list, then a button in page 1 adds some values, then a button in page 2 adds some more values, to do this I am triying declare it in each page but the list is newly created:</p>
  
  <blockquote>
    <p>public static List _songlist = new List(); in each page.</p>
  </blockquote>
  
  <p>Can you help me?, how I can declare the static list then have the same list with the values in all the pages?</p>
  
  <pre><code>public static List&lt;Song&gt; _songlist = new List&lt;Song&gt;();
  
  public class Song
  {
  private string _name;
  public string name
  {
  get { return _name; }
  set { SetProperty(ref _name, value); }
  }
  private string _artist;
  public string artist
  {
  get { return _artist; }
  set { SetProperty(ref _artist, value); }
  }
  }
  </code></pre>
  
  <p>Any help is appreciated.</p>