Vector.Y Property
.NET Framework 4.5
Gets or sets the Y component of this vector.
Namespace: System.Windows
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 two Vector structures for equality.
// Checks if two Vectors are equal using the overloaded equality operator. private Boolean vectorEqualityExample() { // Declaring vecto1 and initializing x,y values Vector vector1 = new Vector(20, 30); // Declaring vector2 without initializing x,y values Vector vector2 = new Vector(); // Boolean to hold the result of the comparison Boolean areEqual; // assigning values to vector2 vector2.X = 45; vector2.Y = 70; // Comparing Vectors for equality // areEqual is False areEqual = (vector1 == vector2); return areEqual; }
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.