xml - C# - Deserialize a class with an internal constructor -
I am working on a drag and drop system for my WPF app.
The way it works is:
- I take the dragged item
- make it serial XML
- I want to repeat it.
This worked fine in my testing app. However, now that I'm trying to do it in my real app, I've hit a snag.
When I try to deserialize it to use this code:
XmlReader Reader = XmlReader.Create (New StringReader (xamlString)); Object elt = xamlReader.load (reader);
I get this error:
Can not create type object 'Microsoft.TeamFoundation.WorkItemTracking.Client.FieldDefinition'. CreateInstance failed, which could be due to 'not being a public default constructor for Microsoft. TAM Foundation. Worktrack Trafficing Client Filter DefinitionAm I Toast? Is there any way to distribute this class? Any other ideas about moving this class through drag and drop? (I am using Floodkit drag and drop advisors.)
I have the field define < / Code> The class is very low and you have at least problems with XML serialization, it is a very complex type in which COM values and many GC handles are reference (indirectly) It will not be easy to sort the examples.
What you can do though, you can serial the referenceName of FieldDefinition
. You can then use it to rebuild FieldDefinition
objects at the later point
Comments
Post a Comment