LinkedResource.CreateLinkedResourceFromString 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 a LinkedResource object from the content stored in a String.
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. |
- 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
.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:
- 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
.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:
- 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
.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: