Class SerializableHashSet<T>
[Serializable]
public abstract class SerializableHashSet<T> : SerializableHashSetBase, ISet<T>, ICollection<T>, IEnumerable<T>, IEnumerable, ISerializationCallbackReceiver, IDeserializationCallback, ISerializable
Type Parameters
T
- Inheritance
-
SerializableHashSet<T>
- Implements
-
ISet<T>ICollection<T>IEnumerable<T>ISerializationCallbackReceiver
- Derived
- Inherited Members
Constructors
SerializableHashSet()
SerializableHashSet method.
public SerializableHashSet()
SerializableHashSet(ISet<T>)
SerializableHashSet method.
public SerializableHashSet(ISet<T> set)
Parameters
setISet<T>The set parameter.
SerializableHashSet(SerializationInfo, StreamingContext)
SerializableHashSet method.
protected SerializableHashSet(SerializationInfo info, StreamingContext context)
Parameters
infoSerializationInfoThe info parameter.
contextStreamingContextThe context parameter.
Properties
Count
Gets or sets the Count value.
public int Count { get; }
Property Value
IsReadOnly
Gets a value indicating whether the readonly condition is met.
public bool IsReadOnly { get; }
Property Value
Methods
Add(T)
Adds an item to the collection.
public bool Add(T item)
Parameters
itemTThe item parameter.
Returns
- bool
True if successful; otherwise, false.
Clear()
Clears all items from the collection.
public void Clear()
Contains(T)
Checks whether the ntains condition is met.
public bool Contains(T item)
Parameters
itemTThe item parameter.
Returns
- bool
True if the condition is met; otherwise, false.
CopyFrom(ISet<T>)
Copies data from another collection into this one.
public void CopyFrom(ISet<T> set)
Parameters
setISet<T>The set parameter.
CopyTo(T[], int)
Copies the collection elements to an array.
public void CopyTo(T[] array, int arrayIndex)
Parameters
arrayT[]The array parameter.
arrayIndexintThe arrayIndex parameter.
ExceptWith(IEnumerable<T>)
ExceptWith method.
public void ExceptWith(IEnumerable<T> other)
Parameters
otherIEnumerable<T>The other parameter.
GetEnumerator()
Gets the enumerator value.
public IEnumerator<T> GetEnumerator()
Returns
- IEnumerator<T>
An enumerator for iterating through the collection.
GetObjectData(SerializationInfo, StreamingContext)
Gets the objectdata value.
public void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
infoSerializationInfoThe info parameter.
contextStreamingContextThe context parameter.
IntersectWith(IEnumerable<T>)
IntersectWith method.
public void IntersectWith(IEnumerable<T> other)
Parameters
otherIEnumerable<T>The other parameter.
IsProperSubsetOf(IEnumerable<T>)
Checks whether the propersubsetof condition is met.
public bool IsProperSubsetOf(IEnumerable<T> other)
Parameters
otherIEnumerable<T>The other parameter.
Returns
- bool
True if the condition is met; otherwise, false.
IsProperSupersetOf(IEnumerable<T>)
Checks whether the propersupersetof condition is met.
public bool IsProperSupersetOf(IEnumerable<T> other)
Parameters
otherIEnumerable<T>The other parameter.
Returns
- bool
True if the condition is met; otherwise, false.
IsSubsetOf(IEnumerable<T>)
Checks whether the subsetof condition is met.
public bool IsSubsetOf(IEnumerable<T> other)
Parameters
otherIEnumerable<T>The other parameter.
Returns
- bool
True if the condition is met; otherwise, false.
IsSupersetOf(IEnumerable<T>)
Checks whether the supersetof condition is met.
public bool IsSupersetOf(IEnumerable<T> other)
Parameters
otherIEnumerable<T>The other parameter.
Returns
- bool
True if the condition is met; otherwise, false.
OnAfterDeserialize()
Called after deserialization to reconstruct internal state.
public void OnAfterDeserialize()
OnBeforeSerialize()
Called before serialization to prepare data for storage.
public void OnBeforeSerialize()
OnDeserialization(object)
Called when deserialization is complete.
public void OnDeserialization(object sender)
Parameters
senderobjectThe sender parameter.
Overlaps(IEnumerable<T>)
Overlaps method.
public bool Overlaps(IEnumerable<T> other)
Parameters
otherIEnumerable<T>The other parameter.
Returns
- bool
True if successful; otherwise, false.
Remove(T)
Removes an item from the collection.
public bool Remove(T item)
Parameters
itemTThe item parameter.
Returns
- bool
True if successful; otherwise, false.
SetEquals(IEnumerable<T>)
Sets the equals value.
public bool SetEquals(IEnumerable<T> other)
Parameters
otherIEnumerable<T>The other parameter.
Returns
- bool
True if successful; otherwise, false.
SymmetricExceptWith(IEnumerable<T>)
SymmetricExceptWith method.
public void SymmetricExceptWith(IEnumerable<T> other)
Parameters
otherIEnumerable<T>The other parameter.
UnionWith(IEnumerable<T>)
UnionWith method.
public void UnionWith(IEnumerable<T> other)
Parameters
otherIEnumerable<T>The other parameter.