Point 結構

定義

代表在二維空間中的 X 和 Y 座標組。Represents an x- and y-coordinate pair in two-dimensional space. 也可以代表特定屬性使用方式的邏輯點。Can also represent a logical point for certain property usages.

public value class Point : IFormattable
public struct Point : IFormattable
[System.Security.SecurityCritical]
public struct Point : IFormattable
type Point = struct
    interface IFormattable
[<System.Security.SecurityCritical>]
type Point = struct
    interface IFormattable
Public Structure Point
Implements IFormattable
繼承
屬性
實作

備註

這代表 Windows 執行階段 (WinRT) 結構的 .NET 投影 PointThis represents the .NET projection of the Windows Runtime (WinRT) Point struct. 如需詳細資訊,請參閱 UWP API 參考中的 For more information, see Point in the UWP API reference.

建構函式

Point(Double, Double)

初始化包含特定值的 Point 結構。Initializes a Point struct that contains the specified values.

屬性

X

取得或設定這個 Point 結構的 X 座標值。Gets or sets the X-coordinate value of this Point struct.

Y

取得或設定這個 YPoint 座標值。Gets or sets the Y-coordinate value of this Point.

方法

Equals(Object)

判斷指定的物件是否為 Point,以及它是否包含與此 Point 相同的值。Determines whether the specified object is a Point and whether it contains the same values as this Point.

Equals(Point)

比較兩個 Point 結構是否相等。Compares two Point structs for equality.

GetHashCode()

傳回這個 Point 的雜湊程式碼。Returns the hash code for this Point.

ToString()

建立這個 StringPoint 表示。Creates a String representation of this Point.

ToString(IFormatProvider)

使用指定的文化特性特定格式資訊,建立此 PointString 表示。Creates a String representation of this Point using the specified culture-specific formatting information..

運算子

Equality(Point, Point)

比較兩個 Point 結構是否相等。Compares two Point structs for equality.

Inequality(Point, Point)

比較兩個 Point 結構是否不相等。Compares two Point structs for inequality.

明確介面實作

IFormattable.ToString(String, IFormatProvider)

如需這個成員的說明,請參閱 ToString(String, IFormatProvider)For a description of this member, see ToString(String, IFormatProvider).

擴充方法

ToVector2(Point)

適用於