Is the TypeConverter attribute supported in CF 2.0?



Does anybody know if the TypeConverter attribute is suppored in CF
2.0? I have found an example of a person using it claing to be in the
CF world... But I get a compile error that TypeConverter is not an
attribute class. MSDN seems to show that it isn't supported which
would back up the compiler error.

Here is a link to the example that I found:
http://groups.google.com/group/microsoft.public.dotnet.framework.compactframework/browse_thread/thread/52fe4d21322edafb/4d3059ecce1ed73d?lnk=gst&q=typeconverter#4d3059ecce1ed73d

What I'm trying to do is databind an object without using the Parse
and Format methods. In the full framework we have implemented this by
creating a class derived from TypeConverter and all of our Business
Objects specify this class by using the TypeConverter attribute. Does
anybody know how I can convert a string to my Business Object in the
business layer (textbox binding). Right now I have to do it in the UI
layer using code like this...

private void orderNumberBinding_Parse( object sender, ConvertEventArgs
e )
{
e.Value = new OrderNumber( e.Value as string );
}

Any help is appreciated. Thank you!
Jerod
.



Relevant Pages

  • Re: ?Propertygrid and dropdown list from database
    ... The thing is I want to use the same typeconverter to ... I have managed to get the dropdown list to work by making the string public. ... department options will be filled with employer types as well. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Tired. Annoyed. Really need help with Control serialization issues. Please...
    ... rather than take care of it in the IDE. ... Some method that Serialize() will be looking for at run-time? ... simpler TypeConverter -- something that parses a simpler string ... > and with the TypeConverter attributes removed. ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: problems with storing a custom type in application settings
    ... As mentioned in the FAQ article, one means is implementing a TypeConverter ... public class MySettingType ... private string _name; ... string str = value as string; ...
    (microsoft.public.dotnet.languages.csharp)
  • issue when linking a TypeConverter to property
    ... When i do not attach a TypeConverter to this property, all custom properties of my custom control are displayed in Test Container. ... /// Check if it the parameter is a string and can convert it to class type (destinationType) ... public override object ConvertTo ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Get/Set vs Public Variables
    ... string firstname; ... The business object should enforce business logic. ... GUI validation is worthwhile, but it doesn't absolve the business object from the responsibility of ensuring valid data. ... This is exactly the type of thing that having a business layer is supposed to eliminate. ...
    (microsoft.public.dotnet.languages.csharp)