Wednesday

serializable abstract class, can be used for inheritance , C# .net

can be used for serialize object to xml


abstract public class AbstractXMLObject
{
public string XML
{
get
{
XmlSerializer xmlSerializer = new XmlSerializer(this.GetType());
StringWriter stringWriter = new StringWriter();
xmlSerializer.Serialize(stringWriter,this);
return stringWriter.ToString();
}
set
{
XmlSerializer xmlSerializer = new XmlSerializer(this.GetType());
StringReader stringReader = new StringReader(value);
this = xmlSerializer.Deserialize(stringReader);
}
}
}


more...

No comments:

imagemagic add text to image

rem different types of text annotations on existing images rem cyan yellow orange gold rem -gravity SouthWest rem draw text and anno...