Size3D.IsEmpty 属性

定义

获取指示此 Size3D 结构是否为空的值。

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

属性值

Boolean

如果 Size3D 结构为空,则为 true;否则为 false。 默认值为 false

示例

以下示例演示如何检查结构是否 Size3D 为空。

 // 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)

注解

Size3D具有XYZ值设置为 0 的结构不为空。 空 Size3D 结构具有 XYZ 设置为负无穷大。 这是结构只能有负值的时间 Size3D

适用于

另请参阅