AlternateView.CreateAlternateViewFromString Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates an AlternateView of an email message using the content specified in a String.
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. |
- 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
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
.NET 9 és más verziók
Termék | Verziók |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |
- 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
- 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
.NET 9 és más verziók
Termék | Verziók |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |
- 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
- 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
.NET 9 és más verziók
Termék | Verziók |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |
.NET-visszajelzés
A(z) .NET egy nyílt forráskód projekt. Visszajelzés adásához válasszon egy hivatkozást: