Uredi

Deli z drugimi prek


AlternateView.CreateAlternateViewFromString Method

Definition

Creates an AlternateView of an email message using the content specified in a String.

Overloads

CreateAlternateViewFromString(String)

Creates a AlternateView of an email message using the content specified in a String.

CreateAlternateViewFromString(String, ContentType)

Creates an AlternateView of an email message using the content specified in a String and the specified MIME media type of the content.

CreateAlternateViewFromString(String, Encoding, String)

Creates an AlternateView of an email message using the content specified in a String, the specified text encoding, and MIME media type of the content.

CreateAlternateViewFromString(String)

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

Creates a AlternateView of an email message using the content specified in a String.

public:
 static System::Net::Mail::AlternateView ^ CreateAlternateViewFromString(System::String ^ content);
public static System.Net.Mail.AlternateView CreateAlternateViewFromString (string content);
static member CreateAlternateViewFromString : string -> System.Net.Mail.AlternateView
Public Shared Function CreateAlternateViewFromString (content As String) As AlternateView

Parameters

content
String

The String that contains the content of the email message.

Returns

An AlternateView object that represents an alternate view of an email message.

Exceptions

content is null.

Remarks

The default media type is plain text and the default encoding is ASCII.

Applies to

CreateAlternateViewFromString(String, ContentType)

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

Creates an AlternateView of an email message using the content specified in a String and the specified MIME media type of the content.

public:
 static System::Net::Mail::AlternateView ^ CreateAlternateViewFromString(System::String ^ content, System::Net::Mime::ContentType ^ contentType);
public static System.Net.Mail.AlternateView CreateAlternateViewFromString (string content, System.Net.Mime.ContentType? contentType);
public static System.Net.Mail.AlternateView CreateAlternateViewFromString (string content, System.Net.Mime.ContentType contentType);
static member CreateAlternateViewFromString : string * System.Net.Mime.ContentType -> System.Net.Mail.AlternateView
Public Shared Function CreateAlternateViewFromString (content As String, contentType As ContentType) As AlternateView

Parameters

content
String

A String that contains the content for this attachment.

contentType
ContentType

A ContentType that describes the data in content.

Returns

An AlternateView object that represents an alternate view of an email message.

Exceptions

content is null.

Applies to

CreateAlternateViewFromString(String, Encoding, String)

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

Creates an AlternateView of an email message using the content specified in a String, the specified text encoding, and MIME media type of the content.

public:
 static System::Net::Mail::AlternateView ^ CreateAlternateViewFromString(System::String ^ content, System::Text::Encoding ^ contentEncoding, System::String ^ mediaType);
public static System.Net.Mail.AlternateView CreateAlternateViewFromString (string content, System.Text.Encoding? contentEncoding, string? mediaType);
public static System.Net.Mail.AlternateView CreateAlternateViewFromString (string content, System.Text.Encoding contentEncoding, string mediaType);
static member CreateAlternateViewFromString : string * System.Text.Encoding * string -> System.Net.Mail.AlternateView
Public Shared Function CreateAlternateViewFromString (content As String, contentEncoding As Encoding, mediaType As String) As AlternateView

Parameters

content
String

A String that contains the content for this attachment.

contentEncoding
Encoding

An Encoding. This value can be null.

mediaType
String

The MIME media type of the content.

Returns

An AlternateView object that represents an alternate view of an email message.

Exceptions

content is null.

Applies to