LinkedResource 建構函式

定義

初始化 LinkedResource 的新執行個體。Initializes a new instance of LinkedResource.

多載

LinkedResource(Stream)

使用所提供的 LinkedResource,初始化 Stream 的新執行個體。Initializes a new instance of LinkedResource using the supplied Stream.

LinkedResource(String)

使用指定的檔案名稱,初始化 LinkedResource 的新執行個體。Initializes a new instance of LinkedResource using the specified file name.

LinkedResource(Stream, ContentType)

使用 LinkedResourceStream 所提供的值,初始化 ContentType 的新執行個體。Initializes a new instance of LinkedResource with the values supplied by Stream and ContentType.

LinkedResource(Stream, String)

使用指定的 LinkedResource 和媒體類型,初始化 Stream 的新執行個體。Initializes a new instance of LinkedResource with the specified Stream and media type.

LinkedResource(String, ContentType)

使用指定的檔案名稱和內容類型,初始化 LinkedResource 的新執行個體。Initializes a new instance of LinkedResource with the specified file name and content type.

LinkedResource(String, String)

使用指定的檔案名稱和媒體類型,初始化 LinkedResource 的新執行個體。Initializes a new instance of LinkedResource with the specified file name and media type.

LinkedResource(Stream)

使用所提供的 LinkedResource,初始化 Stream 的新執行個體。Initializes a new instance of LinkedResource using the supplied Stream.

public:
 LinkedResource(System::IO::Stream ^ contentStream);
public LinkedResource (System.IO.Stream contentStream);
new System.Net.Mail.LinkedResource : System.IO.Stream -> System.Net.Mail.LinkedResource
Public Sub New (contentStream As Stream)

參數

contentStream
Stream

資料流,包含這個內嵌資源的內容。A stream that contains the content for this embedded resource.

例外狀況

contentStreamnullcontentStream is null.

LinkedResource(String)

使用指定的檔案名稱,初始化 LinkedResource 的新執行個體。Initializes a new instance of LinkedResource using the specified file name.

public:
 LinkedResource(System::String ^ fileName);
public LinkedResource (string fileName);
new System.Net.Mail.LinkedResource : string -> System.Net.Mail.LinkedResource
Public Sub New (fileName As String)

參數

fileName
String

保存這個內嵌資源內容的檔案名稱。The file name holding the content for this embedded resource.

例外狀況

fileNamenullfileName is null.

LinkedResource(Stream, ContentType)

使用 LinkedResourceStream 所提供的值,初始化 ContentType 的新執行個體。Initializes a new instance of LinkedResource with the values supplied by Stream and ContentType.

public:
 LinkedResource(System::IO::Stream ^ contentStream, System::Net::Mime::ContentType ^ contentType);
public LinkedResource (System.IO.Stream contentStream, System.Net.Mime.ContentType contentType);
new System.Net.Mail.LinkedResource : System.IO.Stream * System.Net.Mime.ContentType -> System.Net.Mail.LinkedResource
Public Sub New (contentStream As Stream, contentType As ContentType)

參數

contentStream
Stream

資料流,包含這個內嵌資源的內容。A stream that contains the content for this embedded resource.

contentType
ContentType

內容的類型。The type of the content.

例外狀況

contentStreamnullcontentStream is null.

contentType 不是有效的值。contentType is not a valid value.

LinkedResource(Stream, String)

使用指定的 LinkedResource 和媒體類型,初始化 Stream 的新執行個體。Initializes a new instance of LinkedResource with the specified Stream and media type.

public:
 LinkedResource(System::IO::Stream ^ contentStream, System::String ^ mediaType);
public LinkedResource (System.IO.Stream contentStream, string mediaType);
new System.Net.Mail.LinkedResource : System.IO.Stream * string -> System.Net.Mail.LinkedResource
Public Sub New (contentStream As Stream, mediaType As String)

參數

contentStream
Stream

資料流,包含這個內嵌資源的內容。A stream that contains the content for this embedded resource.

mediaType
String

內容的 MIME 媒體類型。The MIME media type of the content.

例外狀況

contentStreamnullcontentStream is null.

mediaType 不是有效的值。mediaType is not a valid value.

LinkedResource(String, ContentType)

使用指定的檔案名稱和內容類型,初始化 LinkedResource 的新執行個體。Initializes a new instance of LinkedResource with the specified file name and content type.

public:
 LinkedResource(System::String ^ fileName, System::Net::Mime::ContentType ^ contentType);
public LinkedResource (string fileName, System.Net.Mime.ContentType contentType);
new System.Net.Mail.LinkedResource : string * System.Net.Mime.ContentType -> System.Net.Mail.LinkedResource
Public Sub New (fileName As String, contentType As ContentType)

參數

fileName
String

保存這個內嵌資源內容的檔案名稱。The file name that holds the content for this embedded resource.

contentType
ContentType

內容的類型。The type of the content.

例外狀況

fileNamenullfileName is null.

contentType 不是有效的值。contentType is not a valid value.

LinkedResource(String, String)

使用指定的檔案名稱和媒體類型,初始化 LinkedResource 的新執行個體。Initializes a new instance of LinkedResource with the specified file name and media type.

public:
 LinkedResource(System::String ^ fileName, System::String ^ mediaType);
public LinkedResource (string fileName, string mediaType);
new System.Net.Mail.LinkedResource : string * string -> System.Net.Mail.LinkedResource
Public Sub New (fileName As String, mediaType As String)

參數

fileName
String

保存這個內嵌資源內容的檔案名稱。The file name that holds the content for this embedded resource.

mediaType
String

內容的 MIME 媒體類型。The MIME media type of the content.

例外狀況

fileNamenullfileName is null.

mediaType 不是有效的值。mediaType is not a valid value.

適用於