Did you try to explicitly tell it the type of the class?  Your CostElement
class must also adhere to the default constructor and public get/set
accessors limitations.

Jeff Block

-----Original Message-----
From: franklin gray [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 12, 2002 1:33 PM
To: [EMAIL PROTECTED]
Subject: [DOTNET] XML Serialization of Class

Can a class with the following be XML Serialized?


    Public Class RatesCollection
        Inherits CollectionBase
        Implements IBindingList



I have a class that has a property with a type of the above class.  Before I
put it in, the serialization was working.  Now I am getting that old
familiar error of...

"An unhandled exception of type 'System.InvalidOperationException' occurred
in system.xml.dll

Additional information: There was an error reflecting
'MyXtraGrid.CostElement'."



This is how I have the property coded.  Any ideas?

    <Xml.Serialization.XmlArray()> _
    Public Property Rates() As RatesCollection
        Get
            Return mRates
        End Get
        Set(ByVal Value As RatesCollection)
            mRates = Value
        End Set
    End Property

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.


**********************************************************************
This message and any attachments are intended for the
individual or entity named above. If you are not the intended
recipient, please do not forward, copy, print,  use or disclose this
communication to others; also please notify the sender by
replying to this message, and then delete it from your system.

The Timken Company
**********************************************************************

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to