Rect.Parse(String) 메서드

정의

지정된 문자열 표현을 사용하여 새 사각형을 만듭니다.

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

매개 변수

source
String

사각형의 문자열 표현이며 "x, y, 너비, 높이" 형식입니다.

반환

Rect

결과 사각형입니다.

예제

다음 예제에서는 사용 하는 방법을 보여 줍니다는 Parse 에 사각형의 문자열 표현으로 변환 하는 메서드를 Rect 구조입니다.

private Rect parseExample()
{

    // Converts a string representation of a Rect into a Rect structure
    // using the Parse static method.
    Rect resultRect = Rect.Parse("10,5, 200,50");

    return resultRect;
}
Private Function parseExample() As Rect

    ' Converts a string representation of a Rect into a Rect structure
    ' using the Parse static method.
    Dim resultRect As Rect = Rect.Parse("10,5, 200,50")

    Return resultRect

End Function

적용 대상