Point.Parse(String) Method

Definition

지정된 Point에서 String를 생성합니다.Constructs a Point from the specified 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

Parameters

source
String

요소의 문자열 표현입니다.A string representation of a point.

Returns

Point

해당 Point 구조체입니다.The equivalent Point structure.

Exceptions

source가 두 개의 쉼표 또는 공백으로 구분된 Double 값으로 구성되어 있지 않은 경우source is not composed of two comma- or space-delimited double values.

source에 두 개의 숫자가 포함되어 있지 않은 경우source does not contain two numbers.

-또는--or- source에 구분 기호가 너무 많은 경우source contains too many delimiters.

Examples

다음 예제에서는 사용 하는 방법을 보여 줍니다는 Parse 변환 하는 메서드를 String 점의 표현을 Point 구조입니다.The following example shows how to use the Parse method to convert a String representation of a point into a Point structure.

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

Applies to