---
title: "MapiAttachment.ContentLength"
url: "https://reference.aspose.com/email/net/aspose.email.mapi/mapiattachment/contentlength/"
product: "Aspose.Email for .NET API Reference"
description: "MapiAttachment property. Gets the length of the attachment content in bytes"
---

## MapiAttachment.ContentLength property

Gets the length of the attachment content in bytes.

```csharp
public long ContentLength { get; }
```

## Remarks

For attachments added from a stream this does not materialise the content. For embedded message attachments (ObjectData.IsOutlookMessage = true), this property returns the size of the embedded message content.

### See Also

* class [MapiAttachment](../)
* namespace [Aspose.Email.Mapi](../../mapiattachment/)
* assembly [Aspose.Email](../../../)


