For example,
I have hashSet like this
Protected ReadOnly Property idsOfExistingOrder As HashSet(Of String)
It's ReadOnly
However, the ReadOnliness of that variable simple means that outsider cannot change the HashSet. It can still say add element to idsOfExistingOrder
So I should do something like this
Function getidsOfExistingOrder() As something
End Function
What is that something?
I look that HashSet support some interface
ICollection<T>, IEnumerable<T>, IEnumerable, ISerializable, IDeserializationCallback, ISet<T>, IReadOnlyCollection<T>
None of which is appropriate
IReadOnlyCollection<T>
seems good but only support count. I want to test if the HashSet also contains some string.
So how should I do this?