Vector.Explicit 연산자
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
오버로드
| Name | Description |
|---|---|
| Explicit(Vector to Point) | |
| Explicit(Vector to Size) |
Size 이 벡터의 오프셋에서 만듭니다. |
Explicit(Vector to Point)
public:
static explicit operator System::Windows::Point(System::Windows::Vector vector);
public static explicit operator System.Windows.Point(System.Windows.Vector vector);
static member op_Explicit : System.Windows.Vector -> System.Windows.Point
Public Shared Narrowing Operator CType (vector As Vector) As Point
매개 변수
- vector
- Vector
변환할 벡터입니다.
반품
의 오프셋 값과 같은 XY - 및 X-좌표 값이 Y있는 점vector입니다.
예제
다음 예제에서는 .로 Vector변환하는 Point 방법을 보여줍니다.
private Point overloadedExplicitOperatorExample2()
{
Vector vector1 = new Vector(20, 30);
// Explicitly converts a Vector structure into a Point structure.
// returnPoint is equal to (20, 30).
Point returnPoint = (Point)vector1;
return returnPoint;
}
Private Function overloadedExplicitOperatorExample2() As Point
Dim vector1 As New Vector(20, 30)
' Explicitly converts a Vector structure into a Point structure.
' returnPoint is equal to (20, 30).
Dim returnPoint As Point = CType(vector1, Point)
Return returnPoint
End Function
적용 대상
Explicit(Vector to Size)
Size 이 벡터의 오프셋에서 만듭니다.
public:
static explicit operator System::Windows::Size(System::Windows::Vector vector);
public static explicit operator System.Windows.Size(System.Windows.Vector vector);
static member op_Explicit : System.Windows.Vector -> System.Windows.Size
Public Shared Narrowing Operator CType (vector As Vector) As Size
매개 변수
- vector
- Vector
변환할 벡터입니다.
반품
Size Width 이 벡터 속성의 절대값과 같고 이 벡터 XHeight 속성의 절대값과 Y 같은 A입니다.
예제
다음 예제에서는 명시적으로 변환 Vector 하는 방법을 보여 있습니다 Size.
private Size overloadedExplicitOperatorExample1()
{
Vector vector1 = new Vector(20, 30);
// Explicitly converts a Vector structure into a Size structure.
// returnSize has a width of 20 and a height of 30.
Size returnSize = (Size)vector1;
return returnSize;
}
Private Function overloadedExplicitOperatorExample1() As Size
Dim vector1 As New Vector(20, 30)
' Explicitly converts a Vector structure into a Size structure.
' returnSize has a width of 20 and a height of 30.
Dim returnSize As Size = CType(vector1, Size)
Return returnSize
End Function