title: implementing a cast operator in a generic abstract class
body: <p>I'm trying to be lazy and implement the cast operators in the abstract base class rather than in each of the derived concrete classes.  I've managed to cast one way, but I'm unable to cast the other.  I think it might not be possible, but wanted to pick the collective SO mind before giving up:</p>
  
  <pre><code>public interface IValueType&lt;T&gt;
  {
      T Value{ get; set; }
  }
  
  public abstract class ValueType&lt;T&gt; : IValueType&lt;T&gt; {
      public abstract T Value { get; set; }
      public static explicit operator T(ValueType&lt;T&gt; vt) {
          if(vt == null)
              return default(T);
          return vt.Value;
      }
  
      public static implicit operator ValueType&lt;T&gt;(T val) {
          ValueType&lt;T&gt; vt = new ValueType&lt;T&gt;(); //&lt;--- obviously this won't work as its abstract
          vt.Value = val;
          return vt;
      }
  }
  </code></pre>