📄 questioncontent.cs
字号:
using System;
using System.Collections.Generic;
using System.Text;
namespace ExaminationSystem.BLL.Domain
{
public abstract class QuestionContent:DomainObject<long>
{
private string content;
public virtual string Content
{
get { return content; }
set { content = value; }
}
private string answer;
public virtual string Answer
{
get { return answer; }
set { answer = value; }
}
private Chapter chapter;
public virtual Chapter Chapter
{
get { return chapter; }
set { chapter = value; }
}
private Hard hard;
public virtual Hard Hard
{
get { return hard; }
set { hard = value; }
}
public abstract string QuestionType
{
get;
}
protected virtual string GetChoicesXML()
{
return "";
}
public virtual string GetContentXML()
{
StringBuilder builder = new StringBuilder(500);
builder.Append("<" + QuestionType+ ">");
builder.Append("<Content><![CDATA[" + Content + "]]></Content>");//builder.Append("<Content>" + Content + "</Content>");
builder.Append("<Answer><![CDATA[" + Answer + "]]></Answer>");
builder.Append(GetChoicesXML());
builder.Append("</" + QuestionType + ">");
return builder.ToString();
}
public override int GetHashCode()
{
return (GetType().FullName + "|" +
Content.GetHashCode()).GetHashCode();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -