AttachmentBase Konstruktorer
Definition
Viktigt
En del information gäller för förhandsversionen av en produkt och kan komma att ändras avsevärt innan produkten blir allmänt tillgänglig. Microsoft lämnar inga garantier, uttryckliga eller underförstådda, avseende informationen som visas här.
Instansierar en ny AttachmentBase.
Överlagringar
| Name | Description |
|---|---|
| AttachmentBase(Stream) |
Instansierar en AttachmentBase med angiven Stream. |
| AttachmentBase(String) |
Instansierar ett AttachmentBase med det angivna filnamnet. |
| AttachmentBase(Stream, ContentType) |
Instansierar en AttachmentBase med angivet Stream och ContentType. |
| AttachmentBase(Stream, String) |
Instansierar en AttachmentBase med den angivna Stream och medietypen. |
| AttachmentBase(String, ContentType) |
Instansierar en AttachmentBase med det angivna filnamnet och innehållstypen. |
| AttachmentBase(String, String) |
Instansierar en AttachmentBase med det angivna filnamnet och medietypen. |
AttachmentBase(Stream)
Instansierar en AttachmentBase med angiven Stream.
protected:
AttachmentBase(System::IO::Stream ^ contentStream);
protected AttachmentBase(System.IO.Stream contentStream);
new System.Net.Mail.AttachmentBase : System.IO.Stream -> System.Net.Mail.AttachmentBase
Protected Sub New (contentStream As Stream)
Parametrar
- contentStream
- Stream
En ström som innehåller innehållet för den här bifogade filen.
Undantag
contentStream är null.
Gäller för
AttachmentBase(String)
Instansierar ett AttachmentBase med det angivna filnamnet.
protected:
AttachmentBase(System::String ^ fileName);
protected AttachmentBase(string fileName);
new System.Net.Mail.AttachmentBase : string -> System.Net.Mail.AttachmentBase
Protected Sub New (fileName As String)
Parametrar
- fileName
- String
Filnamnet som innehåller innehållet för den här bifogade filen.
Undantag
fileName är null.
Gäller för
AttachmentBase(Stream, ContentType)
Instansierar en AttachmentBase med angivet Stream och ContentType.
protected:
AttachmentBase(System::IO::Stream ^ contentStream, System::Net::Mime::ContentType ^ contentType);
protected AttachmentBase(System.IO.Stream contentStream, System.Net.Mime.ContentType contentType);
new System.Net.Mail.AttachmentBase : System.IO.Stream * System.Net.Mime.ContentType -> System.Net.Mail.AttachmentBase
Protected Sub New (contentStream As Stream, contentType As ContentType)
Parametrar
- contentStream
- Stream
En ström som innehåller innehållet för den här bifogade filen.
- contentType
- ContentType
Typ av innehåll.
Undantag
contentStream är null.
contentType är inte ett giltigt värde.
Gäller för
AttachmentBase(Stream, String)
Instansierar en AttachmentBase med den angivna Stream och medietypen.
protected:
AttachmentBase(System::IO::Stream ^ contentStream, System::String ^ mediaType);
protected AttachmentBase(System.IO.Stream contentStream, string mediaType);
new System.Net.Mail.AttachmentBase : System.IO.Stream * string -> System.Net.Mail.AttachmentBase
Protected Sub New (contentStream As Stream, mediaType As String)
Parametrar
- contentStream
- Stream
En ström som innehåller innehållet för den här bifogade filen.
- mediaType
- String
MIME-medietypen för innehållet.
Undantag
contentStream är null.
mediaType är inte ett giltigt värde.
Gäller för
AttachmentBase(String, ContentType)
Instansierar en AttachmentBase med det angivna filnamnet och innehållstypen.
protected:
AttachmentBase(System::String ^ fileName, System::Net::Mime::ContentType ^ contentType);
protected AttachmentBase(string fileName, System.Net.Mime.ContentType contentType);
new System.Net.Mail.AttachmentBase : string * System.Net.Mime.ContentType -> System.Net.Mail.AttachmentBase
Protected Sub New (fileName As String, contentType As ContentType)
Parametrar
- fileName
- String
Filnamnet som innehåller innehållet för den här bifogade filen.
- contentType
- ContentType
Typ av innehåll.
Undantag
fileName är null.
contentType är inte ett giltigt värde.
Gäller för
AttachmentBase(String, String)
Instansierar en AttachmentBase med det angivna filnamnet och medietypen.
protected:
AttachmentBase(System::String ^ fileName, System::String ^ mediaType);
protected AttachmentBase(string fileName, string mediaType);
new System.Net.Mail.AttachmentBase : string * string -> System.Net.Mail.AttachmentBase
Protected Sub New (fileName As String, mediaType As String)
Parametrar
- fileName
- String
Filnamnet som innehåller innehållet för den här bifogade filen.
- mediaType
- String
MIME-medietypen för innehållet.
Undantag
fileName är null.
mediaType är inte ett giltigt värde.