Sdílet prostřednictvím


MatchInfo.ToString Method

Definition

Overloads

ToString()

Returns the string representation of this object. The format depends on whether a path has been set for this object or not.

ToString(String)

Returns the string representation of the match object same format as ToString() but trims the path to be relative to the directory argument.

ToString()

Returns the string representation of this object. The format depends on whether a path has been set for this object or not.

public:
 override System::String ^ ToString();
public:
 override Platform::String ^ ToString();
 override std::wstring ToString();
public override string ToString ();
override this.ToString : unit -> string
Public Overrides Function ToString () As String

Returns

The string representation of the match object.

Remarks

If the path component is set, as would be the case when matching in a file, ToString() would return the path, line number and line text. If path is not set, then just the line text is presented.

Applies to

ToString(String)

Returns the string representation of the match object same format as ToString() but trims the path to be relative to the directory argument.

public:
 System::String ^ ToString(System::String ^ directory);
public:
 Platform::String ^ ToString(Platform::String ^ directory);
std::wstring ToString(std::wstring const & directory);
public string ToString (string directory);
override this.ToString : string -> string
Public Function ToString (directory As String) As String

Parameters

directory
String

Directory to use as the root when calculating the relative path.

Returns

The string representation of the match object.

Applies to