The value of code I wrote the first
///& lt; Few/& gt;
[Serializable ()]
[System.Com ponentModel DesignerCategory (" code ")]
[System. Xml Serialization. XmlType (TypeName="DMPString AnonymousType=true, the Namespace=" http://www.hirain.com/dmp/1.0.0 ")]
//[System. Xml Serialization. XmlRoot (Namespace="http://www.Lincon.com/dmp/1.0.0")]
Public partial class containmentAttributesValue
{
Private string valueField;
///& lt; Few/& gt;
[System. Xml Serialization. XmlAttribute ()]
Public string value
{
The get
{
Return this. The valueField;
}
Set
{
Enclosing valueField=value;
}
}
}
CodePudding user response:
Don't sink ah, looking forward to the great god ~CodePudding user response:
Try VS bring the function of the menu bar select edit - "paste special -" XML paste for the classCodePudding user response:
public static TData DeserializeFromXmlString(String data)
{
Using (StringReader reader=new StringReader (data))
{
XmlSerializer serializer=new XmlSerializer (typeof (TData));
Return (TData) serializer. Deserialize (reader);
}
}
CodePudding user response:
Public class ContainmentAttributes
{
///& lt; Summary>
///
///& lt;/summary>
Public string - key {get; The set; }
}
Public class Devices
{
///& lt; Summary>
///
///& lt;/summary>
Public string - ID {get; The set; }
///& lt; Summary>
///platform management computer
///& lt;/summary>
Public string - Name {get; The set; }
///& lt; Summary>
///
///& lt;/summary>
Public string - lastModifier {get; The set; }
///& lt; Summary>
///
///& lt;/summary>
Public string - modifyTime {get; The set; }
///& lt; Summary>
///
///& lt;/summary>
Public string - shortName {get; The set; }
///& lt; Summary>
///
///& lt;/summary>
Public ContainmentAttributes ContainmentAttributes {get; The set; }
}
Public class Devices
{
///& lt; Summary>
///
///& lt;/summary>
Public string - ID {get; The set; }
///& lt; Summary>
///platform management computer
///& lt;/summary>
Public string - Name {get; The set; }
///& lt; Summary>
///
///& lt;/summary>
Public string - lastModifier {get; The set; }
///& lt; Summary>
///
///& lt;/summary>
Public string - modifyTime {get; The set; }
///& lt; Summary>
///
///& lt;/summary>
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull