Hi,
I have a class that when instantiated needs to read data values from an XML file.
The file is created by a previous instance of the class, via XMLSerializer.Serialize(). No prob.
The prob is that I can't seem to read the values from within the class via XMLSerializer.Deserialize(). I can do it externally no prob.
Here's the code, which is in the class' constructor. The compiler says that 'Me' can't be the target of an assignment. I'm wondering what the solution is. Can you help?
I had to type it by hand here, so hopefully no mistakes.Code:Dim fs as New FileStream(fipData, IO.FileMode.Open) dim xs as New Xml.Serialization.XmlSerializer(GetType(StaticObjectDefaultValues)) Me = CType(xs.Deserialize(fs), StaticObjectDefaultValues)
Thx!





Reply With Quote