The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
Vector.UnaryNegation Operator (Vector)
.NET Framework (current version)
Negates the specified vector.
WindowsBase (in WindowsBase.dll)
public static Vector operator -(
The following example shows how to use this negation operator to negate a Vector structure.
private Vector overloadedNegationOperatorExample()
Vector vector1 = new Vector(20, 30);
// Negate vector1 with the overloaded negation operator.
// vectorResult is equal to (-20, -30).
Vector vectorResult = -vector1;
Return to top
Available since 3.0