IListSource.GetList Yöntem
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
public:
System::Collections::IList ^ GetList();
public System.Collections.IList GetList ();
abstract member GetList : unit -> System.Collections.IList
Public Function GetList () As IList
IList nesnesinden bir veri kaynağına bağlanabilen.
Aşağıdaki kod örneğinde arabirimin nasıl uygulandığı gösterilmektedir IListSource . adlı EmployeeListSource
bir bileşen, yöntemini uygulayarak bir IList for veri bağlamasını GetList kullanıma sunar. Tam kod listesi için bkz . Nasıl yapılır: IListSource Arabirimini Uygulama.
System.Collections.IList IListSource.GetList()
{
BindingList<Employee> ble = new BindingList<Employee>();
if (!this.DesignMode)
{
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));
}
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
Ürün | Sürümler |
---|---|
.NET | Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |
.NET geri bildirimi
.NET, açık kaynak bir projedir. Geri bildirim sağlamak için bir bağlantı seçin: