DesignTimeData.GetDataMember Method (IListSource, String)

 

Gets the specified data member from the specified data source.

Namespace:   System.Web.UI.Design
Assembly:  System.Design (in System.Design.dll)

public static IEnumerable GetDataMember(
	IListSource dataSource,
	string dataMember
)

Parameters

dataSource
Type: System.ComponentModel.IListSource

An IListSource that contains the data in which to find the member.

dataMember
Type: System.String

The name of the data member to retrieve.

Return Value

Type: System.Collections.IEnumerable

An object implementing IEnumerable containing the specified data member from the specified data source, if it exists.

Exception Condition
ArgumentNullException

dataSource is null

-or-

dataMember is null.

This method searches the specified data source for the specified data member. If dataMember is null, the first data member in the specified data source is returned.

.NET Framework
Available since 1.1
Return to top
Show: