---
title: "StreamContainer.WriteTo"
url: "https://reference.aspose.com/cad/net/aspose.cad/streamcontainer/writeto/"
product: "Aspose.CAD for .NET API Reference"
description: "StreamContainer method. Copies the contained data to another StreamContainer."
---

## WriteTo(StreamContainer) {#writeto}

Copies the contained data to another [`StreamContainer`](../).

```csharp
public virtual void WriteTo(StreamContainer streamContainer)
```

| Parameter | Type | Description |
| --- | --- | --- |
| streamContainer | StreamContainer | The stream container to copy to. |

### See Also

* class [StreamContainer](../)
* namespace [Aspose.CAD](../../../aspose.cad/)
* assembly [Aspose.CAD](../../../)

---

## WriteTo(StreamContainer, long) {#writeto_1}

Copies the contained data to another [`StreamContainer`](../).

```csharp
public virtual void WriteTo(StreamContainer streamContainer, long length)
```

| Parameter | Type | Description |
| --- | --- | --- |
| streamContainer | StreamContainer | The stream container to copy to. |
| length | Int64 | The bytes count to write. |

### Exceptions

| exception | condition |
| --- | --- |
| [FrameworkException](../../../aspose.cad.cadexceptions/frameworkexception/) | Copy operation cannot complete. Cannot read + count + bytes. |

### See Also

* class [StreamContainer](../)
* namespace [Aspose.CAD](../../../aspose.cad/)
* assembly [Aspose.CAD](../../../)

