ClearAsync Method ClearAsync() Clears the collection. Declaration Task ClearAsync() Returns Task A task that will complete when the collection has been cleared.