1
간단하면서도 작동하지 않습니다. 목표는 csharp 코드에서 문자열을 강조 표시하는 것입니다.문자열을 강조 표시합니다.
private void HighlightStrings()
{
Regex regex = new Regex(@"^""*""$", RegexOptions.CultureInvariant);
MatchCollection MC = regex.Matches(this.Text);
foreach (Match match in MC)
{
this.Select(match.Index, match.Length);
this.SelectionColor = Color.Red;
}
}
_ "작동하지 않음"_ 무엇입니까? 일어날 것으로 예상되는 것, 일어나는 일 및 시도한 것을 보여주십시오. – CodeCaster
'this.Text','this.Select' 및'this.SelectionColor' 란 무엇입니까? –