Vector3D.ToString 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
ToString() | |
ToString(IFormatProvider) |
ToString()
public:
override System::String ^ ToString();
public override string ToString ();
override this.ToString : unit -> string
Public Overrides Function ToString () As String
傳回
包含這個 X 結構之 Y、Z 和 Vector3D 值的字串。
範例
// Gets a string representation of the structure
Vector3D vector1 = new Vector3D(20, 30, 40);
String vectorString;
vectorString = vector1.ToString();
// vectorString is equal to 20, 30, 40
' Gets a string representation of the structure
Dim vector1 As New Vector3D(20, 30, 40)
Dim vectorString As String
vectorString = vector1.ToString()
' vectorString is equal to 20, 30, 40
適用於
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
文化特性 (Culture) 特有的格式資訊。
傳回
傳回 String,其中包含這個 X 結構的 Y、Z 和 Vector3D 值。