2016-08-12 81 views
-4

我试图把在match.success正确的,但不能工作如何才能在match.success C#中实现?

请帮我

using System; 
using System.IO; 
using System.Text.RegularExpressions; 

class Program 
{ 
    static void Main() 
    { 
     var match.Success=true; 
     while (match.Success) 
     { 
      code 
     } 
    } 
} 
+2

你真的需要更具体的时候提问。我们必须猜测'匹配'。成功'实际上就在这里。 – DavidG

回答

-1

导致它是一个read-only属性是不可能的。请参阅Here

不确定在发布的代码中您的上下文是什么,但看起来像您试图强制设置true并在while循环中使用该上下文。在这种情况下,为什么你不能直接说

while (true) 
{ 
    code 
}