Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/262.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 怎样才能在比赛中实现成功?_C# - Fatal编程技术网

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
}

问问题时,你真的需要更具体一些。我们必须猜一猜匹配的是什么。成功就在这里。