Gets or sets the -coordinate value of this Point structure.
Assembly: WindowsBase (in WindowsBase.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation
The following example shows how to check if two Point structures are not equal. It also illustrates how to assign values to a Point structure when the structure is being declared and after the structure has been declared.
' Checks if two Points are equal using the overloaded inequality operator. Private Function pointInequalityExample() As Boolean ' Checks if two Points are not equal using the overloaded inequality operator. ' Declaring point1 and initializing x,y values Dim point1 As New Point(10, 5) ' Declaring point2 without initializing x,y values Dim point2 As New Point() ' Boolean to hold the result of the comparison Dim areNotEqual As Boolean ' assigning values to point2 point2.X = 15 point2.Y = 40 ' Compare Point structures for equality. ' areNotEqual is True areNotEqual = (point1 <> point2) Return areNotEqual End Function
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2