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
Public Structure Point
Implements IFormattable
继承
属性
实现

注解

这表示 Windows 运行时(WinRT) Point 结构的 .NET 投影。This 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

获取或设置此 X 结构的 Point 坐标值。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)

使用指定的区域性特定的格式设置信息创建此 StringPoint 表示形式。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)

适用于

另请参阅