tiankongcontent.cs
来自「本在线考试系统采用了面向对象的分析和设计」· CS 代码 · 共 27 行
CS
27 行
using System;
using System.Collections.Generic;
using System.Text;
using System.Text.RegularExpressions;
namespace ExaminationSystem.BLL.Domain
{
public class TianKongContent:QuestionContent
{
public override string QuestionType
{
get { return "TianKong"; }
}
public static bool IsBlankAnswerMatch(string content ,string answer)
{
Regex rx = new Regex(@"\$_\S_\$", RegexOptions.Compiled | RegexOptions.IgnoreCase);
MatchCollection matches = rx.Matches(content);
string[] answers = answer.Split(new char[] { ',' });
if (answers.Length != matches.Count)
return false;
return true;
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?