Point3D.Parse(String) 方法

定义

将三维点的 String 表示形式变换为等效的 Point3D 结构。

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

参数

source
String

三维点的 String 表示形式。

返回

等效的 Point3D 结构。

示例

以下示例演示如何将三维点的字符串表示形式转换为 Point3D 结构。

// Converts a string representation of a 3-D point into a Point3D structure.

Point3D pointResult = new Point3D();

pointResult = Point3D.Parse("1,3,5");
// pointResult is equal to (1,3,5)

// Displaying Results
syntaxString = "ointResult = Point3D.Parse(\"1,3,5\");";
resultType = "Matrix";
operationString = "Converting a string into a Point3D structure.";
ShowResults(pointResult.ToString(), syntaxString, resultType, operationString);
' Converts a string representation of a 3-D point into a Point3D structure.

Dim pointResult As New Point3D()

pointResult = Point3D.Parse("1,3,5")
' pointResult is equal to (1,3,5)

' Displaying Results
syntaxString = "ointResult = Point3D.Parse(""1,3,5"")"
resultType = "Matrix"
operationString = "Converting a string into a Point3D structure."
ShowResults(pointResult.ToString(), syntaxString, resultType, operationString)

适用于