Επεξεργασία

Κοινή χρήση μέσω


AlternateView Constructors

Definition

Initializes a new instance of AlternateView.

Overloads

AlternateView(Stream)

Initializes a new instance of AlternateView with the specified Stream.

AlternateView(String)

Initializes a new instance of AlternateView with the specified file name.

AlternateView(Stream, ContentType)

Initializes a new instance of AlternateView with the specified Stream and ContentType.

AlternateView(Stream, String)

Initializes a new instance of AlternateView with the specified Stream and media type.

AlternateView(String, ContentType)

Initializes a new instance of AlternateView with the specified file name and content type.

AlternateView(String, String)

Initializes a new instance of AlternateView with the specified file name and media type.

Remarks

A new instance of the AlternateView class call also be initialized by calling one of the CreateAlternateViewFromString methods.

AlternateView(Stream)

Source:
AlternateView.cs
Source:
AlternateView.cs
Source:
AlternateView.cs

Initializes a new instance of AlternateView with the specified Stream.

public:
 AlternateView(System::IO::Stream ^ contentStream);
public AlternateView (System.IO.Stream contentStream);
new System.Net.Mail.AlternateView : System.IO.Stream -> System.Net.Mail.AlternateView
Public Sub New (contentStream As Stream)

Parameters

contentStream
Stream

A stream that contains the content for this view.

Exceptions

contentStream is null.

Remarks

A new instance of the AlternateView class call also be initialized by calling one of the CreateAlternateViewFromString methods.

Applies to

AlternateView(String)

Source:
AlternateView.cs
Source:
AlternateView.cs
Source:
AlternateView.cs

Initializes a new instance of AlternateView with the specified file name.

public:
 AlternateView(System::String ^ fileName);
public AlternateView (string fileName);
new System.Net.Mail.AlternateView : string -> System.Net.Mail.AlternateView
Public Sub New (fileName As String)

Parameters

fileName
String

The name of the file that contains the content for this alternate view.

Exceptions

fileName is null.

The caller does not have the required permission.

An I/O error occurred, such as a disk error.

The access requested is not permitted by the operating system for the specified file handle, such as when access is Write or ReadWrite and the file handle is set for read-only access.

Remarks

A new instance of the AlternateView class call also be initialized by calling one of the CreateAlternateViewFromString methods.

Applies to

AlternateView(Stream, ContentType)

Source:
AlternateView.cs
Source:
AlternateView.cs
Source:
AlternateView.cs

Initializes a new instance of AlternateView with the specified Stream and ContentType.

public:
 AlternateView(System::IO::Stream ^ contentStream, System::Net::Mime::ContentType ^ contentType);
public AlternateView (System.IO.Stream contentStream, System.Net.Mime.ContentType? contentType);
public AlternateView (System.IO.Stream contentStream, System.Net.Mime.ContentType contentType);
new System.Net.Mail.AlternateView : System.IO.Stream * System.Net.Mime.ContentType -> System.Net.Mail.AlternateView
Public Sub New (contentStream As Stream, contentType As ContentType)

Parameters

contentStream
Stream

A stream that contains the content for this attachment.

contentType
ContentType

The type of the content.

Exceptions

contentStream is null.

contentType is not a valid value.

Remarks

A new instance of the AlternateView class call also be initialized by calling one of the CreateAlternateViewFromString methods.

Applies to

AlternateView(Stream, String)

Source:
AlternateView.cs
Source:
AlternateView.cs
Source:
AlternateView.cs

Initializes a new instance of AlternateView with the specified Stream and media type.

public:
 AlternateView(System::IO::Stream ^ contentStream, System::String ^ mediaType);
public AlternateView (System.IO.Stream contentStream, string? mediaType);
public AlternateView (System.IO.Stream contentStream, string mediaType);
new System.Net.Mail.AlternateView : System.IO.Stream * string -> System.Net.Mail.AlternateView
Public Sub New (contentStream As Stream, mediaType As String)

Parameters

contentStream
Stream

A stream that contains the content for this attachment.

mediaType
String

The MIME media type of the content.

Exceptions

contentStream is null.

mediaType is not a valid value.

Remarks

A new instance of the AlternateView class call also be initialized by calling one of the CreateAlternateViewFromString methods.

Applies to

AlternateView(String, ContentType)

Source:
AlternateView.cs
Source:
AlternateView.cs
Source:
AlternateView.cs

Initializes a new instance of AlternateView with the specified file name and content type.

public:
 AlternateView(System::String ^ fileName, System::Net::Mime::ContentType ^ contentType);
public AlternateView (string fileName, System.Net.Mime.ContentType? contentType);
public AlternateView (string fileName, System.Net.Mime.ContentType contentType);
new System.Net.Mail.AlternateView : string * System.Net.Mime.ContentType -> System.Net.Mail.AlternateView
Public Sub New (fileName As String, contentType As ContentType)

Parameters

fileName
String

The name of the file that contains the content for this alternate view.

contentType
ContentType

The type of the content.

Exceptions

fileName is null.

contentType is not a valid value.

The caller does not have the required permission.

An I/O error occurred, such as a disk error.

The access requested is not permitted by the operating system for the specified file handle, such as when access is Write or ReadWrite and the file handle is set for read-only access.

Remarks

A new instance of the AlternateView class call also be initialized by calling one of the CreateAlternateViewFromString methods.

Applies to

AlternateView(String, String)

Source:
AlternateView.cs
Source:
AlternateView.cs
Source:
AlternateView.cs

Initializes a new instance of AlternateView with the specified file name and media type.

public:
 AlternateView(System::String ^ fileName, System::String ^ mediaType);
public AlternateView (string fileName, string? mediaType);
public AlternateView (string fileName, string mediaType);
new System.Net.Mail.AlternateView : string * string -> System.Net.Mail.AlternateView
Public Sub New (fileName As String, mediaType As String)

Parameters

fileName
String

The name of the file that contains the content for this alternate view.

mediaType
String

The MIME media type of the content.

Exceptions

fileName is null.

mediaType is not a valid value.

The caller does not have the required permission.

An I/O error occurred, such as a disk error.

The access requested is not permitted by the operating system for the specified file handle, such as when access is Write or ReadWrite and the file handle is set for read-only access.

Remarks

A new instance of the AlternateView class call also be initialized by calling one of the CreateAlternateViewFromString methods.

Applies to