DesignTimeData.GetSelectedDataSource 方法

定義

取得在設計主應用程式中依名稱選取的資料來源,以指定之元件的網站屬性表示。

多載

GetSelectedDataSource(IComponent, String)

取得在設計主應用程式中依名稱選取的資料來源,以指定之元件的網站屬性表示,並以指定之資料來源名稱識別。

GetSelectedDataSource(IComponent, String, String)

取得在設計主應用程式中依名稱選取的資料來源,以指定之元件的網站屬性表示,並以指定之資料來源名稱和成員名稱識別。

GetSelectedDataSource(IComponent, String)

取得在設計主應用程式中依名稱選取的資料來源,以指定之元件的網站屬性表示,並以指定之資料來源名稱識別。

public:
 static System::Object ^ GetSelectedDataSource(System::ComponentModel::IComponent ^ component, System::String ^ dataSource);
public static object GetSelectedDataSource (System.ComponentModel.IComponent component, string dataSource);
static member GetSelectedDataSource : System.ComponentModel.IComponent * string -> obj
Public Shared Function GetSelectedDataSource (component As IComponent, dataSource As String) As Object

參數

component
IComponent

IComponent 物件,包含資料來源。

dataSource
String

要擷取的資料來源名稱。

傳回

Object

物件,實作表示所選取之資料來源的 IListSourceIEnumerable,如果無法存取資料來源或設計工具主應用程式 (Designer Host),則為 null

另請參閱

適用於

GetSelectedDataSource(IComponent, String, String)

取得在設計主應用程式中依名稱選取的資料來源,以指定之元件的網站屬性表示,並以指定之資料來源名稱和成員名稱識別。

public:
 static System::Collections::IEnumerable ^ GetSelectedDataSource(System::ComponentModel::IComponent ^ component, System::String ^ dataSource, System::String ^ dataMember);
public static System.Collections.IEnumerable GetSelectedDataSource (System.ComponentModel.IComponent component, string dataSource, string dataMember);
static member GetSelectedDataSource : System.ComponentModel.IComponent * string * string -> System.Collections.IEnumerable
Public Shared Function GetSelectedDataSource (component As IComponent, dataSource As String, dataMember As String) As IEnumerable

參數

component
IComponent

物件,實作包含資料來源屬性的 IComponent

dataSource
String

要擷取的資料來源。

dataMember
String

要擷取的資料成員。

傳回

IEnumerable

物件,實作包含資料成員的 IEnumerable,如果無法存取資料來源、成員或元件的站台,則為 null

另請參閱

適用於