# Class DocumentContent | AnthropicClient
Represents content from a document that is part of a message.

# Class DocumentContent

Namespace
  AnthropicClient.Models

Assembly
  AnthropicClient.dll

Represents content from a document that is part of a message.

    public class DocumentContent : Content

Inheritance
  object
  Content
  DocumentContent

Inherited Members
  Content.Type
  Content.CacheControl
  object.Equals(object)
  object.Equals(object, object)
  object.GetHashCode()
  object.GetType()
  object.MemberwiseClone()
  object.ReferenceEquals(object, object)
  object.ToString()

## Constructors

### DocumentContent(string, string)

Initializes a new instance of the DocumentContent class.

    public DocumentContent(string mediaType, string data)

#### Parameters

`mediaType` string

  The media type of the document.

`data` string

  The data of the document.

#### Exceptions

ArgumentNullException

  Thrown when the media type or data is null.

### DocumentContent(string, string, CacheControl)

Initializes a new instance of the DocumentContent class.

    public DocumentContent(string mediaType, string data, CacheControl cacheControl)

#### Parameters

`mediaType` string

  The media type of the document.

`data` string

  The data of the document.

`cacheControl` CacheControl

  The cache control to be used for the content.

#### Exceptions

ArgumentNullException

  Thrown when the media type, data, or cache control is null.

## Properties

### Source

Gets the source of the document.

    public DocumentSource Source { get; init; }

#### Property Value

DocumentSource