title: System.NotImplementedException C# Xamarin,Android
body: <p>Iam porting an android app to Xamarin.android. The project builds successfully but gives  some runtime error. As I am new to programming in C# for android I am unable to figure out how to resolve it:-
  Here is my java code:-</p>
  
  <pre><code>private Handler handler = new Handler(new Handler.Callback() {
      @Override
      public boolean handleMessage(Message msg) {
        if (msg.what == MSG_SURFACE_CREATED) {
          contentWidth = 0;
          contentHeight = 0;
          requestLayout();
          return true;
        } else {
          Log.w("Unknown msg.what: " + msg.what);
        }
        return false;
      }
    });
  </code></pre>
  
  <p>Here is what i tried in C# :-</p>
  
  <pre><code>private Android.OS.Handler handler = new Android.OS.Handler(new myCallback ());
  
          private class myCallback : Android.OS.Handler.ICallback //inner class
          {
              public myCallback()
              {
              }
  
              FlipViewController fp;    //Create instance of outer class 
              public myCallback(FlipViewController _fp) //pass the instance to constructor of inner class
              {
                  fp = _fp;
              }
              #region ICallback implementation
  
              public bool HandleMessage (Message msg)
              {
  
                  if (msg.What == MSG_SURFACE_CREATED)
                  {
                      contentWidth = 0;
                      contentHeight = 0;
  
                      fp.RequestLayout ();
  
                      return true;
                  }
                  else
                  {
                      FlipperzLog.w("Unknown msg.what: " + msg.What);
                  }
                  return false;
                  throw new NotImplementedException ();
              }
  
              #endregion
  
              #region IDisposable implementation
  
              public void Dispose ()
              {
                  throw new NotImplementedException ();
              }
  
              #endregion
  
              #region IJavaObject implementation
  
              public IntPtr Handle 
              {
                  get {
                      throw new NotImplementedException ();  //Error here
                  }
              }
  
              #endregion
  
  
  
  Instance    {System.NotImplementedException: The requested feature is not implemented.
  at Flipperz.FlipViewController/myCallback.get_Handle () [0x00001] in c:\Users\pooja.gaonkar\Documents\Projects\Flipperz\Flipperz\com.zevenpooja.flip\FlipViewController.cs:88
  at Android.Runtime.JValue..ctor (Android.Runtime.IJavaObject) [0x00007] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.10.1-branch/d23a19bf/source/monodroid/src/Mono.Android/src/Runtime/JValue.cs:79
  at Android.OS.Handler..ctor (Android.OS.Handler/ICallback) [0x000c1] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.10.1-branch/d23a19bf/source/monodroid/src/Mono.Android/platforms/android-18/src/generated/Android.OS.Handler.cs:152
  at Flipperz.FlipViewController..ctor (Android.Content.Context,int) [0x0000b] in c:\Users\pooja.gaonkar\Documents\Projects\Flipperz\Flipperz\com.zevenpooja.flip\FlipViewController.cs:37
  at Flipperz.FlipHorizontalActivity.OnCreate (Android.OS.Bundle) [0x00029] in c:\Users\pooja.gaonkar\Documents\Projects\Flipperz\Flipperz\com.zevenpooja.flipperz\FlipHorizontalActivity.cs:27
  at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_ (intptr,intptr,intptr) [0x00011] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.10.1-branch/d23a19bf/source/monodroid/src/Mono.Android/platforms/android-18/src/generated/Android.App.Activity.cs:2178
  at (wrapper dynamic-method) object.9482ba20-59f9-4425-b64d-e6ea29c92c79 (intptr,intptr,intptr) &lt;IL 0x00017, 0x0001f&gt;
  }   System.NotImplementedException
  </code></pre>