共用方式為


ImportAttribute 建構函式

定義

初始化 ImportAttribute 類別的新執行個體。

多載

名稱 Description
ImportAttribute()

初始化該類別的新實例 ImportAttribute ,並以預設合約名稱匯入匯出檔。

ImportAttribute(String)

初始化該類別的新實例 ImportAttribute ,並匯入指定的合約名稱匯入匯出。

ImportAttribute(Type)

初始化該類別的新實例 ImportAttribute ,匯入以指定類型衍生的合約名稱匯入匯出。

ImportAttribute(String, Type)

初始化類別的新實例 ImportAttribute ,匯入指定的合約名稱與類型匯入匯出。

ImportAttribute()

來源:
ImportAttribute.cs
來源:
ImportAttribute.cs
來源:
ImportAttribute.cs
來源:
ImportAttribute.cs

初始化該類別的新實例 ImportAttribute ,並以預設合約名稱匯入匯出檔。

public:
 ImportAttribute();
public ImportAttribute();
Public Sub New ()

備註

預設合約名稱是呼叫 GetContractName 該方法時,該方法在標記為該屬性的屬性、欄位或參數型別上所產生的。

合約名稱是透過使用 Ordinal 該屬性進行大小寫區分、非語言學的比較來比較的。

適用於

ImportAttribute(String)

來源:
ImportAttribute.cs
來源:
ImportAttribute.cs
來源:
ImportAttribute.cs
來源:
ImportAttribute.cs

初始化該類別的新實例 ImportAttribute ,並匯入指定的合約名稱匯入匯出。

public:
 ImportAttribute(System::String ^ contractName);
public ImportAttribute(string? contractName);
public ImportAttribute(string contractName);
new System.ComponentModel.Composition.ImportAttribute : string -> System.ComponentModel.Composition.ImportAttribute
Public Sub New (contractName As String)

參數

contractName
String

進口出口合約名稱,或 null 使用空字串(“”)作為預設合約名稱。

備註

預設合約名稱是呼叫 GetContractName 標記此屬性的屬性、欄位或參數型別的方法的結果。

合約名稱是透過使用 Ordinal 該屬性進行大小寫區分、非語言學的比較來比較的。

適用於

ImportAttribute(Type)

來源:
ImportAttribute.cs
來源:
ImportAttribute.cs
來源:
ImportAttribute.cs
來源:
ImportAttribute.cs

初始化該類別的新實例 ImportAttribute ,匯入以指定類型衍生的合約名稱匯入匯出。

public:
 ImportAttribute(Type ^ contractType);
public ImportAttribute(Type? contractType);
public ImportAttribute(Type contractType);
new System.ComponentModel.Composition.ImportAttribute : Type -> System.ComponentModel.Composition.ImportAttribute
Public Sub New (contractType As Type)

參數

contractType
Type

是從出口合約名稱衍生的類型,或 null 是使用預設合約名稱。

備註

合約名稱是呼叫 GetContractName 該方法於 的 contractType結果。

預設合約名稱是呼叫 GetContractName 標記此屬性的屬性、欄位或參數型別的方法的結果。

合約名稱是透過使用 Ordinal 該屬性進行大小寫區分、非語言學的比較來比較的。

適用於

ImportAttribute(String, Type)

來源:
ImportAttribute.cs
來源:
ImportAttribute.cs
來源:
ImportAttribute.cs
來源:
ImportAttribute.cs

初始化類別的新實例 ImportAttribute ,匯入指定的合約名稱與類型匯入匯出。

public:
 ImportAttribute(System::String ^ contractName, Type ^ contractType);
public ImportAttribute(string? contractName, Type? contractType);
public ImportAttribute(string contractName, Type contractType);
new System.ComponentModel.Composition.ImportAttribute : string * Type -> System.ComponentModel.Composition.ImportAttribute
Public Sub New (contractName As String, contractType As Type)

參數

contractName
String

進口出口合約名稱,或 null 使用空字串(“”)作為預設合約名稱。

contractType
Type

出口到進口的類型。

適用於