語言

DesignTimeData.GetSelectedDataSource 方法

定義

在設計主機中以名稱選取資料來源,該名稱由指定元件的網站屬性表示。

多載

名稱 Description
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

要取回的資料來源名稱。

傳回

一個實作IListSourceIEnumerable或代表所選資料來源的物件,或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 ,或 null 若無法存取資料來源、成員或元件的網站。

另請參閱

適用於