Custom CodeDomSerializer problem

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Eric Quist (EricQuist_at_discussions.microsoft.com)
Date: 11/15/04

  • Next message: Eric Quist: "I can reproduce the problem"
    Date: Mon, 15 Nov 2004 10:44:02 -0800
    
    

    I have made a custom code serializer.

    internal class ControlItemSerializer : CodeDomSerializer

    In the overriden Serialize method I expect that the value argument has the
    type ControlItem (which also is my own class). This works great about 98% of
    the times. The code is serialized as I want it to do, but sometimes the type
    of the value argument is System.RuntimeType. I can't understand why I get
    diffrent type of objects from the Win Form designer?

    When the argument is of type System.RuntimeType, then its
    UnderlyingSystemType is ControlItem.

    I really need the value argument to be of type ControlItem to be able to
    serialize the code, and I have no idea what to do when its not? Can anyone
    help me, please?


  • Next message: Eric Quist: "I can reproduce the problem"