serializing types

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Paul

    #1

    serializing types

    I am trying to serialize an instance of a class
    (CommandInfo) that contains information about a method.
    An instance of this class contains two variables:

    MethodName
    ParmCollection

    The method name is a string (such as "Delay") and the parm
    collection is a collection of argument types that the
    method requires. I get this information from the
    MethodInfo object that I get from sending "GetMethods " to
    a class type.

    If the parm type is of a class that I created then I can
    successfully serialize the class out (as a SOAP file) and
    read it back in.

    However, if the parm type is an Int16 it appears to have
    problems. For example, a method whose info I'm capturing
    might be called "Delay" and requires one parm, maybe:

    "millisecondsTo Delay as Int16"

    When I de-serialize the file, the ParmCollection' s Count
    is 1 but it's "Nothing" and not the type for an Int16.

    Any ideas?
  • Tian Min Huang

    #2
    RE: serializing types

    Hi Paul,

    Thanks for your post. I reviewed your description carefullly, could you
    please post some code snippet which demostrating how you
    serialize/deserialize the ParmCollection so that we can check what's going
    on?

    I look forward to your response.

    Have a nice day!

    Regards,

    HuangTM
    Microsoft Online Partner Support
    MCSE/MCSD

    Get Secure! -- www.microsoft.com/security
    This posting is provided "as is" with no warranties and confers no rights.

    Comment

    Working...