views:

20

answers:

0

The question is how to create a custom TypeConverter for a type such as Boolean when de/serializing Xml in C#?

<Root>
  <Flag>True</Flag>
</Root>

Currently this does not work because the value 'True' has a capital letter. I want the TypeConverter to take care of converting value to a Boolean.

I know there are a couple ways to achieve this, but I need it as a general solution.