C# 怎样才能在比赛中实现成功?
我试图在比赛中实现成功,但不是工作 请帮帮我C# 怎样才能在比赛中实现成功?,c#,C#,我试图在比赛中实现成功,但不是工作 请帮帮我 using System; using System.IO; using System.Text.RegularExpressions; class Program { static void Main() { var match.Success=true; while (match.Success) { code } } } 这是不可
using System;
using System.IO;
using System.Text.RegularExpressions;
class Program
{
static void Main()
{
var match.Success=true;
while (match.Success)
{
code
}
}
}
这是不可能的,因为它是一个只读属性。看 不确定您在发布的代码中的上下文是什么,但看起来您正试图强制设置
true
,并在while
循环中使用它。在这种情况下,你为什么不能直接说
while (true)
{
code
}
问问题时,你真的需要更具体一些。我们必须猜一猜匹配的是什么。成功就在这里。