title: I am getting System.NullReferenceException when referencing a method
body: <p>I have a button that when clicked should call a method. The program will build but I am getting a runtime error System.NullReferenceException when the method is being called. How is the method null? The exception occurs at the comment line.</p>
  
  <pre><code> protected override void OnCreate(Bundle bundle)
          {
              base.OnCreate(bundle);
  
              // Set our view from the "main" layout resource
              SetContentView(Resource.Layout.Main);
  
              _countdown = (TextView)FindViewById(Resource.Id.countdown);
  
              Button buttonStop = FindViewById&lt;Button&gt;(Resource.Id.stopButton);
              //exception happens below
              buttonStop.Click +=  stopButton_Click;
  
              Button buttonSet = FindViewById&lt;Button&gt;(Resource.Id.setButton);
              buttonSet.Click += setButton_Click;
  
              Button buttonClear = FindViewById&lt;Button&gt;(Resource.Id.clearButton);
              buttonClear.Click += clearButton_Click;
  
              var back = FindViewById&lt;Button&gt;(Resource.Id.buttonBack);
              back.Click += (sender, e) =&gt;
              {
                  StartActivity(typeof(DM_App_Code_Fragment.MainScreen));
              };
  ...
          }
  </code></pre>
  
  <p>This is the method to be called.</p>
  
  <pre><code>private void stopButton_Click(object sender, EventArgs e)
  {
      StopTimer();
  }
  
      private void StopTimer()
      {
          _timer.Enabled = false;
      }
  </code></pre>
  
  <p>This is the code related to _timer</p>
  
  <pre><code>    //initialization
      private System.Timers.Timer _timer = new System.Timers.Timer();
  </code></pre>
  
  <p>The below code occurs in OnCreate method.</p>
  
  <pre><code>        _timer.Interval = 1000;
          _timer.Elapsed += new ElapsedEventHandler(OnTimedEvent);
          _timer.Enabled = false;
  </code></pre>
  
  <p>Also this is a group effort with two Resource.Designer.cs files. There are two of these in the files: One in Resource.Designer.cs and the other in Resource.DesignerQT.cs so I commented out one of them because I was getting an error Duplicate "global::Android.Runtime.ResourceDesignerAttribute" attribute. Now I think this is why the button is null because the Resource files are not loading properly. Is there a way to have two Resource.Designer.cs files in a project or is only one allowed?</p>
  
  <pre><code>[assembly:global::Android.Runtime.ResourceDesignerAttribute("QuickTimer.Resource",   
  IsApplication=true)]
  </code></pre>
  
  <p>This is the xml layout</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"&gt;
      &lt;TextView
          android:text="Quick Timer"
          android:textAppearance="?android:attr/textAppearanceMedium"
          android:layout_centerHorizontal="true"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:id="@+id/textViewQuickTimer" /&gt;
      &lt;TextView
          android:text="Hour"
          android:textAppearance="?android:attr/textAppearanceSmall"
          android:layout_below="@id/textViewQuickTimer"
          android:layout_marginLeft="50dp"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentLeft="true"
          android:id="@+id/textViewHours" /&gt;
      &lt;TextView
          android:text="Min"
          android:textAppearance="?android:attr/textAppearanceSmall"
          android:layout_alignBaseline="@id/textViewHours"
          android:layout_alignBottom="@id/textViewHours"
          android:layout_centerHorizontal="true"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:id="@+id/textViewMinutes" /&gt;
      &lt;TextView
          android:text="Sec"
          android:textAppearance="?android:attr/textAppearanceSmall"
          android:layout_alignBaseline="@id/textViewMinutes"
          android:layout_alignBottom="@id/textViewMinutes"
          android:layout_alignParentRight="true"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_marginRight="60dp"
          android:id="@+id/textViewSeconds" /&gt;
      &lt;Spinner
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_below="@id/textViewHours"
          android:prompt="@string/hours"
          android:layout_marginLeft="34dp"
          android:id="@+id/spinnerHours" /&gt;
      &lt;Spinner
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_below="@id/textViewMinutes"
          android:layout_marginLeft="130dp"
          android:prompt="@string/minutes"
          android:id="@+id/spinnerMinutes" /&gt;
      &lt;Spinner
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_below="@id/textViewSeconds"
          android:layout_marginLeft="220dp"
          android:prompt="@string/seconds"
          android:id="@+id/spinnerSeconds" /&gt;
      &lt;Button
          Click="setButton_Click"
          android:text="Set Timer / Start"
          android:layout_marginTop="15dp"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_below="@id/spinnerMinutes"
          android:id="@+id/setButton"
          android:layout_marginLeft="95dp"
          android:clickable="true" /&gt;
      &lt;TextView
          android:text="Timer Countdown"
          android:layout_marginLeft="100dp"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_below="@id/setButton"
          android:id="@+id/countdown" /&gt;
      &lt;Button
          Click="stopButton_Click"
          android:text="Stop"
          android:id="@+id/stopButton"
          android:layout_below="@id/countdown"
          android:layout_marginLeft="65dp"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content" /&gt;
      &lt;Button
          Click="clearButton_Click"
          android:text="Clear"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_marginLeft="205dp"
          android:layout_below="@id/countdown"
          android:id="@+id/clearButton" /&gt;
      &lt;Button
          android:text="Back"
          android:layout_marginTop="35dp"
          android:layout_centerInParent="true"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_below="@id/clearButton"
          android:id="@+id/buttonBack" /&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>