Horje
convert class to xml string Code Example
convert class to xml string
public string ToXML()
    {
        using(var stringwriter = new System.IO.StringWriter())
        { 
            var serializer = new XmlSerializer(this.GetType());
            serializer.Serialize(stringwriter, this);
            return stringwriter.ToString();
        }
    }

 public static YourClass LoadFromXMLString(string xmlText)
    {
        using(var stringReader = new System.IO.StringReader(xmlText))
        {
            var serializer = new XmlSerializer(typeof(YourClass ));
            return serializer.Deserialize(stringReader) as YourClass ;
        }
    }




Java

Related
play sound on button click android studio Code Example play sound on button click android studio Code Example
how to get width android Code Example how to get width android Code Example
how to check the lines in a file java scanner Code Example how to check the lines in a file java scanner Code Example
string replace java Code Example string replace java Code Example
java string next line Code Example java string next line Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7