Biblioteca de clases de .NET Framework
Attachment..::.CreateAttachmentFromString (Método) (String, ContentType)

Actualización: noviembre 2007

Crea datos adjuntos a un mensaje utilizando el contenido de la cadena especificada y el objeto ContentType especificado.

Espacio de nombres:  System.Net.Mail
Ensamblado:  System (en System.dll)
Sintaxis

Visual Basic (Declaración)
Public Shared Function CreateAttachmentFromString ( _
    content As String, _
    contentType As ContentType _
) As Attachment
Visual Basic (Uso)
Dim content As String
Dim contentType As ContentType
Dim returnValue As Attachment

returnValue = Attachment.CreateAttachmentFromString(content, _
    contentType)
C#
public static Attachment CreateAttachmentFromString(
    string content,
    ContentType contentType
)
Visual C++
public:
static Attachment^ CreateAttachmentFromString(
    String^ content, 
    ContentType^ contentType
)
J#
public static Attachment CreateAttachmentFromString(
    String content,
    ContentType contentType
)
JScript
public static function CreateAttachmentFromString(
    content : String, 
    contentType : ContentType
) : Attachment

Parámetros

content
Tipo: System..::.String
Objeto String que incluye el contenido de estos datos adjuntos.
contentType
Tipo: System.Net.Mime..::.ContentType
Objeto ContentType que representa el encabezado Content-Type MIME (intercambio multipropósito de correo Internet) que se va a utilizar.

Valor devuelto

Tipo: System.Net.Mail..::.Attachment
Objeto de tipo Attachment.
Plataformas

Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

.NET Framework y .NET Compact Framework no admiten todas las versiones de cada plataforma. Para obtener una lista de las versiones compatibles, vea Requisitos de sistema de .NET Framework.
Información de versión

.NET Framework

Compatible con: 3.5, 3.0, 2.0
Vea también

Referencia

Etiquetas :


Page view tracker