Point.Parse(String) メソッド

定義

指定した Point から String を構築します。

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

パラメーター

source
String

ポイントの文字列表現。

戻り値

Point

等価の Point 構造体。

例外

source がコンマまたはスペースで区切られた 2 つの Double 値で構成されていません。

source に 2 つの数値が含まれていません。

  • または - source に含まれている区切り記号が多すぎます。

次の例は、このメソッドを使用 Parse してポイントの表現を String 構造体に変換する方法を Point 示しています。

private Point parseExample()
{

    // Converts a string representation of a point into a Point structure
    // using the Parse static method.
    // pointResult is equal to (1,3).
    Point pointResult = Point.Parse("1,3");

    return pointResult;
}
Private Function parseExample() As Point

    ' Converts a string representation of a point into a Point structure
    ' using the Parse static method.
    ' pointResult is equal to (1,3).
    Dim pointResult As Point = Point.Parse("1,3")

    Return pointResult

End Function

適用対象