Point.ToString Methode
Definition
Wichtig
Einige Informationen beziehen sich auf Vorabversionen, die vor dem Release ggf. grundlegend überarbeitet werden. Microsoft übernimmt hinsichtlich der hier bereitgestellten Informationen keine Gewährleistungen, seien sie ausdrücklich oder konkludent.
Überlädt
| Name | Beschreibung |
|---|---|
| ToString() | |
| ToString(IFormatProvider) |
ToString()
public:
override System::String ^ ToString();
public override string ToString();
override this.ToString : unit -> string
Public Overrides Function ToString () As String
Gibt zurück
A String containing the X and Y values of this Point structure.
Beispiele
Das folgende Beispiel zeigt, wie Sie die ToString Methode verwenden, um eine String Darstellung einer Point Struktur abzurufen.
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
Gilt für:
ToString(IFormatProvider)
public:
System::String ^ ToString(IFormatProvider ^ provider);
public string ToString(IFormatProvider provider);
override this.ToString : IFormatProvider -> string
Public Function ToString (provider As IFormatProvider) As String
Parameter
- provider
- IFormatProvider
Kulturspezifische Formatierungsinformationen.
Gibt zurück
A String containing the X and Y values of this Point structure.