Using custom TypeConverter outside of PropertyGrid



I have written all these wonderful custom TypeConverter for my enums
to display in a PropertyGrid. I would now like to use the same
TypeConverter to save out and read in the values to and from a text
file, in a generic fashion. I would like to have a function like
this:

void WriteValue(StreamWriter sw, string name, Enum value);
.



Relevant Pages

  • RE: PropertyGrid has problems with interfaces
    ... PropertyGrid checks the TypeConverter for the property. ... TypeConverter for IFormatProvider is ReferenceConverter. ... To get the custom editor to appear, we should use a custom TypeConverter ... private string m_Val2 = null; ...
    (microsoft.public.dotnet.framework.windowsforms.controls)
  • Re: enums
    ... enums were meant to be displayed. ... you could create a separate structure like an array that ... contains their display name. ...
    (microsoft.public.dotnet.languages.csharp)