Olvasás angol nyelven Szerkesztés

Megosztás a következőn keresztül:


LinkedResource.CreateLinkedResourceFromString Method

Definition

Creates a LinkedResource object from the content stored in a String.

Overloads

CreateLinkedResourceFromString(String)

Creates a LinkedResource object from a string to be included in an email attachment as an embedded resource. The default media type is plain text, and the default content type is ASCII.

CreateLinkedResourceFromString(String, ContentType)

Creates a LinkedResource object from a string to be included in an email attachment as an embedded resource, with the specified content type, and media type as plain text.

CreateLinkedResourceFromString(String, Encoding, String)

Creates a LinkedResource object from a string to be included in an email attachment as an embedded resource, with the specified content type, and media type.

CreateLinkedResourceFromString(String)

Source:
LinkedResource.cs
Source:
LinkedResource.cs
Source:
LinkedResource.cs

Creates a LinkedResource object from a string to be included in an email attachment as an embedded resource. The default media type is plain text, and the default content type is ASCII.

public static System.Net.Mail.LinkedResource CreateLinkedResourceFromString (string content);

Parameters

content
String

A string that contains the embedded resource to be included in the email attachment.

Returns

A LinkedResource object that contains the embedded resource to be included in the email attachment.

Exceptions

The specified content string 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

CreateLinkedResourceFromString(String, ContentType)

Source:
LinkedResource.cs
Source:
LinkedResource.cs
Source:
LinkedResource.cs

Creates a LinkedResource object from a string to be included in an email attachment as an embedded resource, with the specified content type, and media type as plain text.

public static System.Net.Mail.LinkedResource CreateLinkedResourceFromString (string content, System.Net.Mime.ContentType? contentType);
public static System.Net.Mail.LinkedResource CreateLinkedResourceFromString (string content, System.Net.Mime.ContentType contentType);

Parameters

content
String

A string that contains the embedded resource to be included in the email attachment.

contentType
ContentType

The type of the content.

Returns

A LinkedResource object that contains the embedded resource to be included in the email attachment.

Exceptions

The specified content string 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

CreateLinkedResourceFromString(String, Encoding, String)

Source:
LinkedResource.cs
Source:
LinkedResource.cs
Source:
LinkedResource.cs

Creates a LinkedResource object from a string to be included in an email attachment as an embedded resource, with the specified content type, and media type.

public static System.Net.Mail.LinkedResource CreateLinkedResourceFromString (string content, System.Text.Encoding? contentEncoding, string? mediaType);
public static System.Net.Mail.LinkedResource CreateLinkedResourceFromString (string content, System.Text.Encoding contentEncoding, string mediaType);

Parameters

content
String

A string that contains the embedded resource to be included in the email attachment.

contentEncoding
Encoding

The type of the content.

mediaType
String

The MIME media type of the content.

Returns

A LinkedResource object that contains the embedded resource to be included in the email attachment.

Exceptions

The specified content string 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