title: Xamarin.Essentials Preferences Generic Wrapper
body: <p>I'm trying to make a wrapper of <code>Preference</code> class in <code>Xamarin.Essentials</code></p>
  <p>Preference class set function has following method signatures. So I wanted to use a generic wrapper on it.</p>
  <p><code>Preferences.Set(string key, string/int/bool/DateTime value) etc.</code></p>
  <p>I want something like this(<em>code below</em>).</p>
  <p><code>GetStorage</code> is working fine.</p>
  <p><code>SetStorage</code> is giving me <strong>ERROR!!</strong></p>
  <pre><code>public StorageService: IStorageService
  {
      public T GetStorage&lt;T&gt;(string key)
      {
          object value = Preferences.Get(key,null);
          return (T)Convert.ChangeType(value, typeof(T));
      }
  
      public void SetStorage&lt;T&gt;(string key, T value)
      {
          Preferences.Set(key, value); // ERROR HERE
      }
  }
  </code></pre>
  <p>How do I get this working???</p>