Size3D.IsEmpty Właściwość

Definicja

Pobiera wartość wskazującą, czy ta Size3D struktura jest pusta.

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

Wartość właściwości

true jeśli struktura jest pusta Size3D ; w przeciwnym razie false. Wartość domyślna to false.

Przykłady

W poniższym przykładzie pokazano, jak sprawdzić, czy struktura jest pusta 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)

Uwagi

Struktura Size3D z wartościami X, Yi Z ustawiona na wartość 0 nie jest pusta. Pusta Size3D struktura ma Xwartości , Yi Z ustawione na nieskończoność ujemną. Jest to jedyny czas, w jaki Size3D struktura może mieć wartości ujemne.

Dotyczy

Zobacz też