Vector3D.ToString 方法

定義

建立這個 String 結構的 Vector3D 表示。Creates a String representation of this Vector3D structure.

多載

ToString()

建立這個 String 結構的 Vector3D 表示。Creates a String representation of this Vector3D structure.

ToString(IFormatProvider)

建立這個 String 結構的 Vector3D 表示。Creates a String representation of this Vector3D structure.

ToString()

建立這個 String 結構的 Vector3D 表示。Creates a String representation of this Vector3D structure.

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

傳回

包含這個 X 結構之 YZVector3D 值的字串。A string containing the X, Y, and Z values of this Vector3D structure.

範例

// 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 表示。Creates a String representation of this Vector3D structure.

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) 特有的格式資訊。Culture-specific formatting information.

傳回

傳回 String,其中包含這個 X 結構的 YZVector3D 值。Returns a String containing the X, Y, and Z values of this Vector3D structure.

適用於