Point4D.W Property
.NET Framework 3.0
Gets or sets the W component of this Point4D structure.
Namespace: System.Windows.Media.Media3D
Assembly: PresentationCore (in presentationcore.dll)
XML Namespace: http://schemas.microsoft.com/winfx/2006/xaml/presentation
Assembly: PresentationCore (in presentationcore.dll)
XML Namespace: http://schemas.microsoft.com/winfx/2006/xaml/presentation
/** @property */ public double get_W () /** @property */ public void set_W (double value)
public function get W () : double public function set W (value : double)
<object W="double" .../>
Property Value
The W component of this Point4D structure. The default value is 0.This example shows how to test Point4D structures for equality and inequality.
The following code illustrates how to test Point4D structures for equality and inequality using the Point4D equality methods. The Point4D structures are tested for equality using the overloaded == operator, then for inequality using the overloaded != operator, and finally a Point3D structure and a Point4D structure are checked for equality using the static Equals method.
// instantiate Points Point4D point4D1 = new Point4D(); Point4D point4D2 = new Point4D(15, 40, 60, 75); Point3D point3D1 = new Point3D(15, 40, 60); // result variables Boolean areEqual; Boolean areNotEqual; String stringResult; // defining x,y,z,w of point1 point4D1.X = 10; point4D1.Y = 5; point4D1.Z = 1; point4D1.W = 4; // checking if Points are equal areEqual = point4D1 == point4D2; // areEqual is False // checking if Points are not equal areNotEqual = point4D1 != point4D2; // areNotEqual is True if (Point4D.Equals(point4D1, point3D1)) { // the if condition is not true, so this block will not execute stringResult = "Both objects are Point4D structures and they are equal"; } else { // the if condition is false, so this branch will execute stringResult = "Parameters are not both Point4D strucutres, or they are but are not equal"; }
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.