Rect.Parse(String) 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
지정된 문자열 표현에서 새 사각형을 만듭니다.
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, width, height" 형식의 사각형의 문자열 표현입니다.
반품
결과 사각형입니다.
예제
다음 예제에서는 메서드를 사용하여 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