title: How to access array defined in class in another class without constructor?
body: <p>I have this code given by the API that I'm using.</p>
  
  <pre><code>    public partial class getMerchant : object, System.ComponentModel.INotifyPropertyChanged
      {
          private int[] iMerchantIdField;
  
          /// &lt;remarks/&gt;
          [System.Xml.Serialization.XmlElementAttribute("iMerchantId", Form = System.Xml.Schema.XmlSchemaForm.Unqualified, Order = 0)]
          public int[] iMerchantId
          {
              get
              {
                  return this.iMerchantIdField;
              }
              set
              {
                  this.iMerchantIdField = value;
                  this.RaisePropertyChanged("iMerchantId");
              }
          }
      }
  </code></pre>
  
  <p>Now I was trying to create an object of this class and to run it:</p>
  
  <pre><code>    private void btnShowResult_Click(object sender, EventArgs e)
      {
  
          Awin.ApiPortTypeClient client = new Awin.ApiPortTypeClient();
  
          UserAuthentication userAuthentication = new UserAuthentication();
          userAuthentication.sApiKey = "111";
  
          getMerchant merchant = new getMerchant();
  
          merchant.iMerchantId[0] = 2518;
          merchant.iMerchantId[1] = 3030;
  
  
          var response = client.getMerchant(userAuthentication, merchant);
  
          lblResult.Text = response[0].sName.ToString();
  
      }
  </code></pre>
  
  <p>But whenever I try to run it it gives a nullreferenceexception when the compiler hit the line merchant.iMerchantId[0] = 2518;
  What I understood so far is that this iMerchantId[] hasn't been declared yet. But the problem is also that I can't find an answer how to declare it.</p>
  
  <p>I am thankful for any help that I can get.</p>