# TSet.Remove by index documentation is wrong

**URL:** <https://forums.unrealengine.com/t/tset-remove-by-index-documentation-is-wrong/403264>\
**Category:** Feedback & Requests\
**Tags:** documentation-bug, set, removal, unreal-engine, documentation, question\
**Created:** [August 30, 2017, 11:39am UTC](https://forums.unrealengine.com/t/tset-remove-by-index-documentation-is-wrong/403264 "2017-08-30T11:39:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![darkgaze](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@darkgaze](https://forums.unrealengine.com/u/darkgaze)\
**Post date:** [August 30, 2017, 11:39am UTC](https://forums.unrealengine.com/t/tset-remove-by-index-documentation-is-wrong/403264/1 "2017-08-30T11:39:01Z")

</div>

Here’s the official documentation on TSets.

> **[TSet](https://docs.unrealengine.com/5.3/en-US/set-containers-in-unreal-engine/)**
>
> TSets are a fast container class to store (usually) unique elements in a context where the order is irrelevant.

The docs say:

> Elements can be removed by index with  
> the Remove function, though this is  
> recommended only for use while  
> iterating through the elements:

```
 FruitSet.Remove(0); <-- will remove the first item.

```

So there is no way to differentiate between using an index or using an item.

Ok. Now here’s the problem: What happens if your TSet contains **int** variables?.

**Set.Remove(5)****will remove item 5 or find which item contains the int “5” and remove it?**

---

<div class="post-metadata">

**Author:** ![darkgaze](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@darkgaze](https://forums.unrealengine.com/u/darkgaze)\
**Post date:** [September 25, 2017, 10:43am UTC](https://forums.unrealengine.com/t/tset-remove-by-index-documentation-is-wrong/403264/2 "2017-09-25T10:43:47Z")

</div>

I tested this, for those who are curious.

**Documentation is still unclear and I think It should be fixed.**

.remove(5) will remove items with an “int 5” inside, no matter which index. In fact, it doesn’t remove the item on index 5.
