Point.ToString Metoda

Definicja

Tworzy reprezentację String tej Point struktury.

Przeciążenia

ToString()

Tworzy reprezentację String tego elementu Point.

ToString(IFormatProvider)

Tworzy reprezentację String tego elementu Point.

ToString()

Tworzy reprezentację String tego elementu Point.

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

Zwraca

Element String zawierający X wartości i Y tej Point struktury.

Przykłady

W poniższym przykładzie pokazano, jak za pomocą ToString metody uzyskać reprezentację StringPoint struktury.

private String toStringExample()
{

    Point point1 = new Point(10, 5);

    // Get a string representation of a Point structure.
    // pointString is equal to 10,5	.
    String stringResult = point1.ToString();

    return stringResult;
}
Private Function toStringExample() As String

    Dim point1 As New Point(10, 5)

    ' Get a string representation of a Point structure.
    ' pointString is equal to 10,5	.
    Dim stringResult As String = point1.ToString()

    Return stringResult

End Function

Dotyczy

ToString(IFormatProvider)

Tworzy reprezentację String tego elementu Point.

public:
 System::String ^ ToString(IFormatProvider ^ provider);
public string ToString (IFormatProvider provider);
override this.ToString : IFormatProvider -> string
Public Function ToString (provider As IFormatProvider) As String

Parametry

provider
IFormatProvider

Informacje o formatowaniu specyficznym dla kultury.

Zwraca

Element String zawierający X wartości i Y tej Point struktury.

Dotyczy