Point.ToString Méthode
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
ToString() | |
ToString(IFormatProvider) |
ToString()
public:
override System::String ^ ToString();
public override string ToString ();
override this.ToString : unit -> string
Public Overrides Function ToString () As String
Retours
String contenant les valeurs X et Y de cette structure de Point.
Exemples
L’exemple suivant montre comment utiliser la ToString méthode pour obtenir une représentation d’une String 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
S’applique à
.NET Framework 4.8 et autres versions
Produit | Versions |
---|---|
.NET Framework | 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8 |
Windows Desktop | 3.0, 3.1, 5, 6, 7 |
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
Paramètres
- provider
- IFormatProvider
Informations de mise en forme spécifiques à la culture.
Retours
String contenant les valeurs X et Y de cette structure de Point.
S’applique à
.NET Framework 4.8 et autres versions
Produit | Versions |
---|---|
.NET Framework | 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8 |
Windows Desktop | 3.0, 3.1, 5, 6, 7 |