Modifier static is not valid for this item error in C#
<p>I am trying to implement Push notifications using Azure's Notifications Hub in Xamarin forms. Currently I am doing this for Android, using GCM and I follow <a href="https://azure.microsoft.com/en-in/documentation/articles/app-service-mobile-xamarin-forms-get-started-push/" rel="nofollow">this link</a>. But in Step 5 of the tutorial in 'Adding push notifications to the droid project', I get the error that <code>modifier static is not valid for this item</code>. After this step, this is what my code looks like: </p>

<pre><code>protected override void OnCreate (Bundle bundle)
    {
        base.OnCreate (bundle);

        // Create a new instance field for this activity.
        static MainActivity instance = null;
        // Set the current instance of MainActivity.
        instance = this;

        global::Xamarin.Forms.Forms.Init (this, bundle);
        Microsoft.WindowsAzure.MobileServices.CurrentPlatform.Init();
        LoadApplication (new App ());
        try
        {
            // Check to ensure everything's setup right
            GcmClient.CheckDevice(this);
            GcmClient.CheckManifest(this);

            // Register for push notifications
            System.Diagnostics.Debug.WriteLine("Registering...");
            GcmClient.Register(this, PushHandlerBroadcastReceiver.SENDER_IDS);
        }
        catch (Java.Net.MalformedURLException)
        {
            CreateAndShowDialog("There was an error creating the Mobile Service. Verify the URL", "Error");
        }
        catch (Exception e)
        {
            CreateAndShowDialog(e.Message, "Error");
        }
        private void CreateAndShowDialog(String message, String title)
    {
        AlertDialog.Builder builder = new AlertDialog.Builder(this);

        builder.SetMessage(message);
        builder.SetTitle(title);
        builder.Create().Show();
    }
    // Return the current activity instance.
    public static MainActivity CurrentActivity
    {
        get
        {
            return instance;
        }
    }
}
</code></pre>

<p>I am new to C# and Xamarin forms, and cannot figure out where I am going wrong. </p>