Bagikan melalui


ITypedList.GetListName(PropertyDescriptor[]) Metode

Definisi

Mengembalikan nama daftar.

public:
 System::String ^ GetListName(cli::array <System::ComponentModel::PropertyDescriptor ^> ^ listAccessors);
public string GetListName (System.ComponentModel.PropertyDescriptor[] listAccessors);
public string GetListName (System.ComponentModel.PropertyDescriptor[]? listAccessors);
abstract member GetListName : System.ComponentModel.PropertyDescriptor[] -> string
Public Function GetListName (listAccessors As PropertyDescriptor()) As String

Parameter

listAccessors
PropertyDescriptor[]

Array PropertyDescriptor objek, yang nama daftarnya dikembalikan. Ini bisa berupa null.

Mengembalikan

Nama daftar.

Contoh

Contoh kode berikut menunjukkan cara mengimplementasikan GetListName metode . Untuk daftar kode lengkap, lihat Cara: Menerapkan Antarmuka ITypedList.

// This method is only used in the design-time framework 
// and by the obsolete DataGrid control.
public string GetListName(PropertyDescriptor[] listAccessors)
{   
    return typeof(T).Name;
}
' This method is only used in the design-time framework 
' and by the obsolete DataGrid control.
Public Function GetListName( _
ByVal listAccessors() As PropertyDescriptor) As String _
Implements System.ComponentModel.ITypedList.GetListName

    Return GetType(Tkey).Name

End Function

Keterangan

Metode ini hanya digunakan dalam kerangka kerja waktu desain dan oleh kontrol usang DataGrid .

Berlaku untuk

Lihat juga