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(System::String ^ content);
public static System.Net.Mail.LinkedResource CreateLinkedResourceFromString (string content);
static member CreateLinkedResourceFromString : string -> System.Net.Mail.LinkedResource
Public Shared Function CreateLinkedResourceFromString (content As String) As LinkedResource

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

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(System::String ^ content, System::Net::Mime::ContentType ^ contentType);
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);
static member CreateLinkedResourceFromString : string * System.Net.Mime.ContentType -> System.Net.Mail.LinkedResource
Public Shared Function CreateLinkedResourceFromString (content As String, contentType As ContentType) As LinkedResource

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

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(System::String ^ content, System::Text::Encoding ^ contentEncoding, System::String ^ mediaType);
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);
static member CreateLinkedResourceFromString : string * System.Text.Encoding * string -> System.Net.Mail.LinkedResource
Public Shared Function CreateLinkedResourceFromString (content As String, contentEncoding As Encoding, mediaType As String) As LinkedResource

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