AttachmentBase Constructor (String, String)

Instantiates an AttachmentBase with the specified file name and media type.

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

protected AttachmentBase(
	string fileName,
	string mediaType
)

Parameters

fileName
Type: System.String

The file name holding the content for this attachment.

mediaType
Type: System.String

The MIME media type of the content.

ExceptionCondition
ArgumentNullException

fileName is null.

FormatException

mediaType is not a valid value.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft