Vector3D.ToString 方法

定義

建立這個 String 結構的 Vector3D 表示。

多載

ToString()

建立這個 String 結構的 Vector3D 表示。

ToString(IFormatProvider)

建立這個 String 結構的 Vector3D 表示。

ToString()

建立這個 String 結構的 Vector3D 表示。

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

傳回

包含這個 X 結構之 YZVector3D 值的字串。

範例

// 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)

建立這個 String 結構的 Vector3D 表示。

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 結構的 YZVector3D 值。

適用於