# DataRelationInfoCollection Class

> An instance of the DataRelationInfoCollection class contains all data relations in a data source represented through objects of the type DataRelationInfo. The DataRelationInfoCollection class implements the interface ICollection<DataRelationInfo> and therefore also IEnumerable<DataRelationInfo>. This collection class is meant to be read only. For this reason all ICollection members which would cause changes to the collection content (e. g. Add(), Clear() or Remove()) throw a NotSupportedException.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Class
- **Introduced:** 24.0
- **Namespace:** `TXTextControl.DocumentServer.DataSources`
- **Package:** `TXTextControl.TextControl.WPF.SDK` (assembly `TXDocumentServer.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXDocumentServer.dll` from the setup
- **Implements:** `System.Collections.Generic.ICollection<TXTextControl.DocumentServer.DataSources.DataRelationInfo>`, `System.Collections.Generic.IEnumerable<TXTextControl.DocumentServer.DataSources.DataRelationInfo>`, `System.Collections.IEnumerable`
- **Path:** TX Text Control .NET for WPF > Reference > TXTextControl.DocumentServer.DataSources > DataRelationInfoCollection Class
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver-datasources/datarelationinfocollection/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver-datasources/datarelationinfocollection/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver-datasources/datarelationinfocollection/llms-full.txt

---

## On This Page

- [Description](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver-datasources/datarelationinfocollection/#description)
- [Syntax](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver-datasources/datarelationinfocollection/#syntax)
- [Examples](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver-datasources/datarelationinfocollection/#examples)
- [Members](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver-datasources/datarelationinfocollection/#members)

---

## In This Section

- [DataRelationInfoCollection.CopyTo Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver-datasources/datarelationinfocollection/copyto-method/llms.txt): Copies the elements of the collection to an array, starting at a particular index.
- [DataRelationInfoCollection.Count Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver-datasources/datarelationinfocollection/count-property/llms.txt): Gets the number of elements contained in the collection.
- [DataRelationInfoCollection.GetEnumerator Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver-datasources/datarelationinfocollection/getenumerator-method/llms.txt): Returns an enumerator that can be used to iterate through the collection.
- [DataRelationInfoCollection.IsReadOnly Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver-datasources/datarelationinfocollection/isreadonly-property/llms.txt): Gets a value indicating whether the collection is read only. Always returns true.
- [DataRelationInfoCollection.Item Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver-datasources/datarelationinfocollection/item-property/llms.txt): Gets the DataRelationInfo instance with the specified 0-based index from the collection. In C# this property is the indexer for the DataRelationInfoCollection class.

---

## Nearby

- **Previous:** [DataRelationInfo.RelationName Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver-datasources/datarelationinfo/relationname-property/llms.txt)
- **Next:** [DataRelationInfoCollection.CopyTo Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver-datasources/datarelationinfocollection/copyto-method/llms.txt)
