2016-08-12 73 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 
}