An unordered, unkeyed collection that can contain the same element
multiple times. The .NET collections API, has no Bag.
Most developers seem to use IList<(Of <(<'T>)>)> to represent bag semantics,
so NHibernate follows this practice.
Namespace: NHibernate.Collection.GenericAssembly: NHibernate (in NHibernate.dll) Version: 3.2.0.4000 (3.2.0.4000)
Syntax
C# |
---|
[SerializableAttribute] public class PersistentGenericBag<T> : PersistentBag, IList<T>, ICollection<T>, IEnumerable<T>, IEnumerable |
Visual Basic |
---|
<SerializableAttribute> _ Public Class PersistentGenericBag(Of T) _ Inherits PersistentBag _ Implements IList(Of T), ICollection(Of T), _ IEnumerable(Of T), IEnumerable |
Visual C++ |
---|
[SerializableAttribute] generic<typename T> public ref class PersistentGenericBag : public PersistentBag, IList<T>, ICollection<T>, IEnumerable<T>, IEnumerable |
Type Parameters
- T
- The type of the element the bag should hold.
Remarks
The underlying collection used is an List<(Of <(<'T>)>)>
Inheritance Hierarchy
System..::..Object
NHibernate.Collection..::..AbstractPersistentCollection
NHibernate.Collection..::..PersistentBag
NHibernate.Collection.Generic..::..PersistentGenericBag<(Of <(<'T>)>)>
NHibernate.Collection..::..AbstractPersistentCollection
NHibernate.Collection..::..PersistentBag
NHibernate.Collection.Generic..::..PersistentGenericBag<(Of <(<'T>)>)>