Point.ToString 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| ToString() | |
| ToString(IFormatProvider) |
ToString()
public:
override System::String ^ ToString();
public override string ToString();
override this.ToString : unit -> string
Public Overrides Function ToString () As String
傳回
範例
以下範例說明如何利用此 ToString 方法取得 String 結構的表示 Point 。
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
適用於
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
參數
- provider
- IFormatProvider
文化特定的格式資訊。