# DataSourceManager.LoadSingleObject Method

> Loads a single object which is either a Dictionary with string keys or an object of an arbitrary type as a data source. The data tables, column names are deduced either from the key names or the public property names and types using .NET reflection.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 24.0
- **Namespace:** `TXTextControl.DocumentServer.DataSources`
- **Package:** `TXTextControl.TextControl.WinForms.SDK` (assembly `TXDocumentServer.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXDocumentServer.dll` from the setup
- **Path:** TX Text Control .NET for Windows Forms > Reference > TXTextControl.DocumentServer.DataSources > DataSourceManager.LoadSingleObject Method
- **384 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-datasources/datasourcemanager/loadsingleobject-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-datasources/datasourcemanager/loadsingleobject-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-datasources/datasourcemanager/loadsingleobject-method/llms-full.txt

---

### Description

Loads a single object which is either a Dictionary with string keys or an object of an arbitrary type as a data source. The data tables, column names are deduced either from the key names or the public property names and types using .NET reflection.

### Syntax

```csharp
public void LoadSingleObject(object obj);
```

```vbnet
Public Sub LoadSingleObject(obj As Object)
```

### Parameters

| Parameter | Description |
|---|---|
| obj | A single object which is either a Dictionary with string keys or an object of an arbitrary type as a data source. |

### Examples

The following example uses Load Single Object in a focused Data Source Manager workflow. The created object is then available to the surrounding document workflow.

```csharp
dataSourceManager.LoadSingleObject("Approved");
Console.WriteLine("Data Source Manager is ready for use.");
```

```vbnet
dataSourceManager.LoadSingleObject("Approved")
Console.WriteLine("Data Source Manager is ready for use.")
```

---

## Nearby

- **Previous:** [DataSourceManager.LoadObjects Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-datasources/datasourcemanager/loadobjects-method/llms-full.txt)
- **Next:** [DataSourceManager.LoadXmlFile Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-documentserver-datasources/datasourcemanager/loadxmlfile-method/llms-full.txt)
