---
tags:
    - "None"
    - "Zero"
    - "Count"
    - "Length"
    - "Size"
    - "List"
    - "Array"
---

# Collection Is Empty

[Collections](index.md) / **Collection Is Empty**

<div class="grid cards" markdown>

* :green_circle: Can Read

* :red_circle: Cannot Write

</div>

## Description

Returns True if the collection does not have any item

## Parameters

| Name | Description |
| :--- | :---------- |
| Collection | The collection whose items are counted |

## Code

```cs
using System;
using UnityEngine;
using VisualScript.Icons;

namespace VisualScript.Runtime
{
    [Get]

    [Title("Collection Is Empty")]
    [Category("Collections/Is Empty")]

    [Description("Returns True if the collection does not have any item")]
    [Image(typeof(IconStack), ColorTheme.Type.Teal, typeof(BadgeCross))]

    [Parameter("Collection", "The collection whose items are counted")]

    [Keywords("None", "Zero", "Count", "Length", "Size", "List", "Array")]

    [Serializable]
    public class TypeBoolCollectionIsEmpty : TypeBool
    {
        [SerializeField] private GetCollection m_Collection = new GetCollection();

        public override bool Get(Args args)
        {
            return this.m_Collection.Capture(args) == 0;
        }

        public override string ToString()
        {
            return $"{this.m_Collection} is Empty";
        }

        protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
    }
}
```

