ITypedList.GetListName(PropertyDescriptor[]) Метод
Определение
Возвращает имя списка.Returns the name of the list.
public:
System::String ^ GetListName(cli::array <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
Параметры
- listAccessors
- PropertyDescriptor[]
Массив объектов PropertyDescriptor, для которых возвращается имя списка.An array of PropertyDescriptor objects, for which the list name is returned. Это может быть null
.This can be null
.
Возвращаемое значение
Имя списка.The name of the list.
Примеры
В следующем примере кода показано, как реализовать GetListName метод.The following code example demonstrates how to implement the GetListName method. Полный листинг кода см. в разделе как реализовать интерфейс ITypedList.For a full code listing, see How to: Implement the ITypedList Interface.
// 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
Комментарии
Этот метод используется только в платформе времени разработки и в устаревшем DataGrid элементе управления.This method is used only in the design-time framework and by the obsolete DataGrid control.