Editar

Partilhar via


Size3D.IsEmpty Property

Definition

Gets a value that indicates whether this Size3D structure is empty.

public:
 property bool IsEmpty { bool get(); };
public bool IsEmpty { get; }
member this.IsEmpty : bool
Public ReadOnly Property IsEmpty As Boolean

Property Value

true if the Size3D structure is empty; otherwise, false. The default is false.

Examples

The following example shows how to check if a Size3D structure is empty.

 // Checks if a Size3D structure is empty
 // Returns Boolean

 Size3D size1 = new Size3D(0, 0, 0);
 Boolean isEmpty;

 isEmpty = size1.IsEmpty;
 // isEmpty is False 

 // Displaying Results
 syntaxString = "isEmpty = size1.IsEmpty;";
 resultType = "Boolean";
 operationString = "Checking if a Size3D structure is empty";
 ShowResults(isEmpty.ToString(), syntaxString, resultType, operationString);
' Checks if a Size3D structure is empty
' Returns Boolean

Dim size1 As New Size3D(0, 0, 0)
Dim isEmpty As Boolean

isEmpty = size1.IsEmpty
' isEmpty is False 

' Displaying Results
syntaxString = "isEmpty = size1.IsEmpty"
resultType = "Boolean"
operationString = "Checking if a Size3D structure is empty"
ShowResults(isEmpty.ToString(), syntaxString, resultType, operationString)

Remarks

A Size3D structure with X, Y, and Z values set to 0 is not empty. An empty Size3D structure has X, Y, and Z values set to negative infinity. This is the only time a Size3D structure can have negative values.

Applies to

See also