title: TypeDescriptor.GetConverter(typeof(string)) cannot convert to my custom type
body: <p>I'm using some third party code which uses TypeConverters to "cast" objects to types specified as generic parameters.</p>
  
  <p>The 3rd party code gets the string type converter, and expects to do all conversions through that e.g.</p>
  
  <pre><code>var typeConverter = TypeDescriptor.GetConverter(typeof(string));
  </code></pre>
  
  <p>I've written a custom type, and type converter for it (and registered it with the TypeDescriptor attribute) but it's not getting used by the 3rd party code, which fails on the call to <code>typeConverter.CanConvertTo(MyCustomType)</code></p>
  
  <p>Until today I'd only encountered TypeConverters in the abstract, I've seen mentions of them but never built or used one.</p>
  
  <p>Has anyone any idea what I'm doing wrong here?</p>
  
  <p>My - cut down - code</p>
  
  <pre><code>using System;
  using System.ComponentModel;
  
  namespace IoNoddy
  {
  [TypeConverter(typeof(TypeConverterForMyCustomType))]
  public class MyCustomType
  {
      public Guid Guid { get; private set; }
      public MyCustomType(Guid guid)
      {
          Guid = guid;
      }
      public static MyCustomType Parse(string value)
      {
          return new MyCustomType(Guid.Parse(value));
      }
  }
  
  public class TypeConverterForMyCustomType
      : TypeConverter
  {
      public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
      {
          return ((sourceType == typeof(string)) || base.CanConvertFrom(context, sourceType));
      }
      public override object ConvertFrom(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value)
      {
          string strValue;
          if ((strValue = value as string) != null)
              try
              {
                  return MyCustomType.Parse(strValue);
              }
              catch (FormatException ex)
              {
                  throw new FormatException(string.Format("ConvertInvalidPrimitive: Could not convert {0} to MyCustomType", value), ex);
              }
          return base.ConvertFrom(context, culture, value);
      }
  }
  }
  
  static void Main(string[] args)
  {
      // Analogous to what 3rd party code is doing: 
      var typeConverter = TypeDescriptor.GetConverter(typeof(string));
      // writes "Am I convertible? false"
      Console.WriteLine("Am I convertible? {0}",  typeConverter.CanConvertTo(typeof(MyCustomType))); 
  }
  </code></pre>