ערוך

שתף באמצעות


Point.ToString Method

Definition

Creates a String representation of this Point structure.

Overloads

ToString()

Creates a String representation of this Point.

ToString(IFormatProvider)

Creates a String representation of this Point.

ToString()

Creates a String representation of this Point.

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

Returns

A String containing the X and Y values of this Point structure.

Examples

The following example shows how to use the ToString method to get a String representation of a Point structure.

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

Applies to

ToString(IFormatProvider)

Creates a String representation of this 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

Parameters

provider
IFormatProvider

Culture-specific formatting information.

Returns

A String containing the X and Y values of this Point structure.

Applies to