Vector3D.Parse(String) 方法

定义

String 三维矢量的表示形式转换为等效 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

String三维矢量的表示形式。

返回

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)

适用于