ContentDisposition Constructors

Definition

Initializes a new instance of the ContentDisposition class.

Overloads

ContentDisposition()

Initializes a new instance of the ContentDisposition class with a DispositionType of Attachment.

ContentDisposition(String)

Initializes a new instance of the ContentDisposition class with the specified disposition information.

ContentDisposition()

Source:
ContentDisposition.cs
Source:
ContentDisposition.cs
Source:
ContentDisposition.cs

Initializes a new instance of the ContentDisposition class with a DispositionType of Attachment.

public:
 ContentDisposition();
public ContentDisposition ();
Public Sub New ()

Examples

The following code example demonstrates how to call this constructor.

ContentDisposition^ c1 = gcnew ContentDisposition;
Console::WriteLine( c1 );
ContentDisposition c1 = new ContentDisposition();
Console.WriteLine(c1.ToString());

Remarks

The instance returned by this constructor has the DispositionType property set to Attachment.

Applies to

ContentDisposition(String)

Source:
ContentDisposition.cs
Source:
ContentDisposition.cs
Source:
ContentDisposition.cs

Initializes a new instance of the ContentDisposition class with the specified disposition information.

public:
 ContentDisposition(System::String ^ disposition);
public ContentDisposition (string disposition);
new System.Net.Mime.ContentDisposition : string -> System.Net.Mime.ContentDisposition
Public Sub New (disposition As String)

Parameters

disposition
String

A DispositionTypeNames value that contains the disposition.

Exceptions

disposition is null or equal to Empty ("").

Examples

The following code example demonstrates how to call this constructor.

ContentDisposition^ c2 = gcnew ContentDisposition( L"attachment" );
Console::WriteLine( c2 );
ContentDisposition c2 = new ContentDisposition("attachment");
Console.WriteLine(c2.ToString());

Applies to