Show / Hide Table of Contents

IsEmpty Property

IsEmpty

Indicates whether there is any data or not. If this is true, then the contents of any property are meaningless.

C#
public bool IsEmpty { get; protected set; }

Property Value

Type Description
bool

Remarks

Note that is it possible for some Data Objects to contain data, but all that data is "default" or "nothing". For example, the KeyHistory class contains numbers of certs and a URL. It is possible a YubiKey contains and encoded Key History in the Key History data location, but that data includes no certs and no URL.

Suppose you build a KeyHistory object using the ReadObject<T>() method, and the YubiKey contains data in the Key History storage area, but that data indicates there are no certs and no URL. The resulting object will not be empty (the IsEmpty field will be false). However, the properties describing the contents will be zero and NULL.

If you build the KeyHistory object using the constructor, it will begin as empty, but if you set any properties, even to zero or null, the object will become not empty.

In this article
Back to top Generated by DocFX