title: NullReferenceException When setting a parram
body: <p>I am trying to solve this problem on my own, but the error keeps on showing up: <code>System.NullReferenceException: Object reference not set to an instance of an object</code>
  The lines that are causing this are :</p>
  
  <pre><code>line = new LinearLayout(this);
  lisCount++;
  lis[lisCount] = line;
  line.SetBackgroundColor(Color.Rgb(12, 155, 12));
  var lineParams = line.LayoutParameters; // &lt;- line with exception
  lineParams.Width = ViewGroup.LayoutParams.MatchParent;
  </code></pre>
  
  <p>Can Anyone help me?</p>
  
  <p>EDIT:
  Changed to:</p>
  
  <pre><code>line = new LinearLayout(this);
  line.LayoutParameters = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MatchParent,
       ViewGroup.LayoutParams.WrapContent);lisCount++;
  lis[lisCount] = line;
  line.SetBackgroundColor(Color.Rgb(12, 155, 12));
  var lineParams = line.LayoutParameters;
  lineParams.Width = ViewGroup.LayoutParams.MatchParent;`
  </code></pre>
  
  <p>The problem now is that the LinearLayout disappears alltoghether</p>