> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Class Connection

Namespace: [OpenTD](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD)\
Assembly: OpenTD.dll

A connection contains a handle and a marker. The handle uniquely identifies a
TD entity while the marker specifies how to connect to the entity, e.g., which
side of a surface to connect to.

```csharp theme={null}
[DataContract]
public class Connection
```

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ←
[Connection](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.Connection.md)

## Inherited Members

[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring),
[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object\)),
[object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object-system-object\)),
[object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals),
[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode),
[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype),
[object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone)

## Constructors

### Connection(string, int)

```csharp theme={null}
public Connection(string _Handle, int _Marker)
```

#### Parameters

`_Handle` [string](https://learn.microsoft.com/dotnet/api/system.string)

`_Marker` [int](https://learn.microsoft.com/dotnet/api/system.int32)

### Connection()

Initializes a new instance of the [Connection](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.Connection.md) class.

```csharp theme={null}
public Connection()
```

### Connection(string)

Initializes a new instance of the [Connection](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.Connection.md) class.

```csharp theme={null}
public Connection(string _Handle)
```

#### Parameters

`_Handle` [string](https://learn.microsoft.com/dotnet/api/system.string)

AutoCAD handle.

### Connection(DbObject)

Initializes a new instance of the [Connection](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.Connection.md) class.

```csharp theme={null}
public Connection(DbObject x)
```

#### Parameters

`x` [DbObject](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.DbObject.md)

Gets the AutoCAD handle from this DbObject.

#### See Also

[DbObject](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.DbObject.md)

### Connection(DbObject, int)

Initializes a new instance of the [Connection](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.Connection.md) class.

```csharp theme={null}
public Connection(DbObject x, int _Marker)
```

#### Parameters

`x` [DbObject](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.DbObject.md)

Gets the AutoCAD handle from this DbObject.

`_Marker` [int](https://learn.microsoft.com/dotnet/api/system.int32)

The marker specifies how to connect to the entity.

#### See Also

[DbObject](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.DbObject.md)

## Fields

### Empty

```csharp theme={null}
public static readonly Connection Empty
```

#### Field Value

[Connection](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.Connection.md)

## Properties

### Handle

```csharp theme={null}
[DataMember]
public string Handle { get; set; }
```

#### Property Value

[string](https://learn.microsoft.com/dotnet/api/system.string)

### Marker

```csharp theme={null}
[DataMember]
public int Marker { get; set; }
```

#### Property Value

[int](https://learn.microsoft.com/dotnet/api/system.int32)

## Methods

### GetDomainName()

```csharp theme={null}
public string GetDomainName()
```

#### Returns

[string](https://learn.microsoft.com/dotnet/api/system.string)

### IsDomainName()

```csharp theme={null}
public bool IsDomainName()
```

#### Returns

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### IsEmpty()

```csharp theme={null}
public bool IsEmpty()
```

#### Returns

[bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### SetDomainName(string)

```csharp theme={null}
public void SetDomainName(string domainName)
```

#### Parameters

`domainName` [string](https://learn.microsoft.com/dotnet/api/system.string)

### ToString()

Returns a string that represents the current object.

```csharp theme={null}
public override string ToString()
```

#### Returns

[string](https://learn.microsoft.com/dotnet/api/system.string)

A string that represents the current object.

## Operators

### implicit operator Connection(string)

```csharp theme={null}
public static implicit operator Connection(string handle)
```

#### Parameters

`handle` [string](https://learn.microsoft.com/dotnet/api/system.string)

#### Returns

[Connection](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.Connection.md)

### implicit operator Connection(DbObject)

```csharp theme={null}
public static implicit operator Connection(DbObject x)
```

#### Parameters

`x` [DbObject](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.DbObject.md)

#### Returns

[Connection](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.Connection.md)

### implicit operator List\<Connection>(Connection)

Implicitly converts a single element into a one-element list.

```csharp theme={null}
public static implicit operator List<Connection>(Connection x)
```

#### Parameters

`x` [Connection](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.Connection.md)

#### Returns

[List](https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1)\<[Connection](https://developer.synopsys.com/docs/thermal-desktop/opentd-reference/net4-reference/OpenTD.Connection.md)>
