ContentDisposition Constructor (String)

 

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

Namespace:   System.Net.Mime
Assembly:  System (in System.dll)

public ContentDisposition(
	string disposition
)

Parameters

disposition
Type: System.String

A DispositionTypeNames value that contains the disposition.

Exception Condition
FormatException

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

The following code example demonstrates how to call this constructor.

ContentDisposition c2 = new ContentDisposition("attachment");
Console.WriteLine(c2.ToString());

.NET Framework
Available since 2.0
Return to top
Show: