using System;
using System.Xml.Linq;
public class MyAnnotation {
private string tag;
public string Tag {get{return tag;} set{tag=value;}}
public MyAnnotation(string tag) {
this.tag = tag;
}
}
public class Program {
public static void Main(string[] args) {
MyAnnotation ma = new MyAnnotation("T1");
XElement root = new XElement("Root", "content");
root.AddAnnotation(ma);
MyAnnotation ma2 = root.Annotation();
Console.WriteLine(ma2.Tag);
}
}