共用方式為


Vector3D.Parse(String) 方法

定義

String 3D 向量的表示轉換成對等 Vector3D 結構。

public:
 static System::Windows::Media::Media3D::Vector3D Parse(System::String ^ source);
public static System.Windows.Media.Media3D.Vector3D Parse (string source);
static member Parse : string -> System.Windows.Media.Media3D.Vector3D
Public Shared Function Parse (source As String) As Vector3D

參數

source
String

String3D 向量的表示。

傳回

Vector3D

對等的 Vector3D 結構。

範例

下列範例示範如何使用 Parse 方法,將 vector3D 的字串表示轉換成 Vector3D 結構。

// Converts a string representation of a vector into a Vector3D structure

Vector3D vectorResult = new Vector3D();

vectorResult = Vector3D.Parse("1,3,5");
// vectorResult is equal to (1, 3, 5)
' Converts a string representation of a vector into a Vector3D structure

Dim vectorResult As New Vector3D()

vectorResult = Vector3D.Parse("1,3,5")
' vectorResult is equal to (1, 3, 5)

適用於