Size3D.Z Property
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
public:
property double Z { double get(); void set(double value); };
public double Z { get; set; }
member this.Z : double with get, set
Public Property Z As Double
The Z value of this Size3D structure. The default value is 0
.
The following example shows how to check if two Size3D structures are equal. It also shows how to assign values to a Size3D structure when the structure is being declared and after the structure has been declared.
private bool size3DEqualityExample()
{
// Checks if two Size3D structures are equal using the static Equals method.
// Returns a Boolean.
// Declaring Size3D structure without initializing x,y,z values
Size3D size1 = new Size3D();
// Delcaring Size3D structure and initializing x,y,z values
Size3D size2 = new Size3D(5, 10, 15);
Boolean areEqual;
// Assigning values to size1
size1.X = 2;
size1.Y = 4;
size1.Z = 6;
// checking for equality
areEqual = Size3D.Equals(size1, size2);
// areEqual is False
return areEqual;
}
The X, Y, and Z values must be non-negative.
Size3D and Rect3D are not typically used in XAML, because no settable properties exist in the WPF 3D object model that use those types.
Product | Versions |
---|---|
.NET Framework | 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: