共用方式為


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)

備註

Size3DXYZ 值設定為 0 的結構不是空的。 空 Size3D 結構具有 XYZ 值設定為負無限大。 這是結構可以有負值的唯一 Size3D 時間。

適用於

另請參閱