{
string Title { get; set; }
string Content { get; set; }
}
{
private string title;
private string content;
public string Title
{
get { return title; }
set { title = value; }
}
public string Content
{
get { return content; }
set { content = value; }
}
private static Test test;
public static Test GetTest
{
get { return test = new Test(); }
}
}
{
static void Main(string[] args)
{
IDocument<OperationGuide> oper = Test.GetTest;
IDocument<Document> doc = oper;
}
}
{
void ShowInfo(T docInfo);
}
{
public void ShowInfo(Document doc)
{
Console.WriteLine("我是文檔父類"+doc.ToString());
}
}
{
static void Main(string[] args)
{
OperationGuide operation = new OperationGuide();
IDocument<Document> doc = new Display();
IDocument<OperationGuide> oper = doc;
oper.ShowInfo(operation);
}
}