Group.Success 屬性

定義

取得值,指出比對是否成功。Gets a value indicating whether the match is successful.

public:
 property bool Success { bool get(); };
public bool Success { get; }
member this.Success : bool
Public ReadOnly Property Success As Boolean

屬性值

如果比對成功,則為 true,否則為 falsetrue if the match is successful; otherwise, false.

備註

如果至少有一個子字串是由這個群組所捕捉,則 Success 屬性為 true。The Success property is true if at least one substring was captured by this group. 它相當於布林運算式(Group. > 0 的 Count)。It is equivalent to the Boolean expression (Group.Captures.Count > 0).

適用於