Questa documentazione è stata archiviata e non viene gestita.

Proprietà Vector.Y

Gets or sets the Y component of this vector.

Spazio dei nomi: System.Windows
Assembly: WindowsBase (in windowsbase.dll)
Spazio dei nomi XML:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

public double Y { get; set; }
/** @property */
public double get_Y ()

/** @property */
public void set_Y (double value)

public function get Y () : double

public function set Y (value : double)

Valore proprietà

The Y component of this vector. The default value is 0.

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;

}

Microsoft .NET Framework 3.0 è supportato in Windows Vista, Microsoft Windows XP SP2 e Windows Server 2003 SP1.

.NET Framework

Supportato in:
Mostra: