Wednesday, May 25, 2005

Custom Control Property Deserialization Problem

I just want to share this little tid-bit. When building custom controls, if you build a custom type converter, only use commas to separate your pieces of information. I have a control that I'm building that needed size and corner information. So I separated the size info and each of the corner information by the pipe as shown below:

However, when I tried to deserialize the information (reload the form), the designer choked and said that the string was in the incorrect format. Changing the separator to a comma (along with my deserialization code) resolved the problem.

As you can see, even Blogger can't handle the pipe character.