IListSource.GetList 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
public:
System::Collections::IList ^ GetList();
public System.Collections.IList GetList();
abstract member GetList : unit -> System.Collections.IList
Public Function GetList () As IList
반품
IList 개체의 데이터 원본에 바인딩할 수 있는 값입니다.
예제
다음 코드 예제는 IListSource 인터페이스를 구현하는 방법을 설명합니다. 명명된 EmployeeListSource 구성 요소는 메서드를 IList 구현하여 데이터 바인딩을 노출합니다 GetList . 전체 코드 목록은 방법: IListSource 인터페이스 구현을 참조하세요.
System.Collections.IList IListSource.GetList()
{
BindingList<Employee> ble = DesignMode
? []
: [
new("Aaberg, Jesper", 26000000),
new ("Aaberg, Jesper", 26000000),
new ("Cajhen, Janko", 19600000),
new ("Furse, Kari", 19000000),
new ("Langhorn, Carl", 16000000),
new ("Todorov, Teodor", 15700000),
new ("Verebélyi, Ágnes", 15700000)
];
return ble;
}
Public Function GetList() As System.Collections.IList Implements System.ComponentModel.IListSource.GetList
Dim ble As New BindingList(Of Employee)
If Not Me.DesignMode Then
ble.Add(New Employee("Aaberg, Jesper", 26000000))
ble.Add(New Employee("Cajhen, Janko", 19600000))
ble.Add(New Employee("Furse, Kari", 19000000))
ble.Add(New Employee("Langhorn, Carl", 16000000))
ble.Add(New Employee("Todorov, Teodor", 15700000))
ble.Add(New Employee("Verebélyi, Ágnes", 15700000))
End If
Return ble
End Function
적용 대상
추가 정보
- IListSource
- ITypedList
- BindingList<T>
- IBindingList
- 데이터 바인딩 및 윈도우즈 폼즈