title: How to convert a NSString to a String in MonoTouch
body: <p>I am trying to implement push notifications for MonoTouch but I couldn´t find samples of this anywhere. My problem is trying to read the deviceID into a .NET string. </p>
  
  <p>The output below is just a lot of question marks so I am doing something wrong here. </p>
  
  <p>Any help would be greatly appreciated!</p>
  
  <pre><code>    public override void RegisteredForRemoteNotifications (UIApplication application, NSData deviceToken)
      {
          Console.WriteLine("Converting device ID...");
          NSString s = NSString.FromData(deviceToken, NSStringEncoding.UTF8);
          Console.WriteLine("DEVICE ID IS: " + s);
          s = NSString.FromData(deviceToken, NSStringEncoding.ASCIIStringEncoding);
          Console.WriteLine("DEVICE ID IS: " + s);
           s = NSString.FromData(deviceToken, NSStringEncoding.Unicode);
          Console.WriteLine("DEVICE ID IS: " + s);
  
  
      }
  </code></pre>