次の方法で共有


PSObject.ToString Method

Definition

Overloads

ToString()

Returns the string representation for this object. A ToString CodeMethod or ScriptMethod will be used, if available. Enumerations items are concatenated using $ofs.

ToString(String, IFormatProvider)

Returns the string representation for this object. A ToString CodeMethod or ScriptMethod will be used, if available. Enumerations items are concatenated using $ofs.

ToString()

Returns the string representation for this object. A ToString CodeMethod or ScriptMethod will be used, if available. Enumerations items are concatenated using $ofs.

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 for baseObject.

Exceptions

If an exception was thrown by the BaseObject's ToString.

Applies to

ToString(String, IFormatProvider)

Returns the string representation for this object. A ToString CodeMethod or ScriptMethod will be used, if available. Enumerations items are concatenated using $ofs.

public:
 virtual System::String ^ ToString(System::String ^ format, IFormatProvider ^ formatProvider);
public string ToString (string format, IFormatProvider formatProvider);
override this.ToString : string * IFormatProvider -> string
Public Function ToString (format As String, formatProvider As IFormatProvider) As String

Parameters

format
String

Repassed to baseObject's IFormattable if present.

formatProvider
IFormatProvider

Repassed to baseObject's IFormattable if present.

Returns

The string representation for baseObject.

Implements

Exceptions

If an exception was thrown by the BaseObject's ToString.

Applies to