ITypedList.GetListName(PropertyDescriptor[]) Method

Definition

Returns the name of the list.

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

Parameters

listAccessors
PropertyDescriptor[]

An array of PropertyDescriptor objects, for which the list name is returned. This can be null.

Returns

The name of the list.

Examples

The following code example demonstrates how to implement the GetListName method. 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

Remarks

This method is used only in the design-time framework and by the obsolete DataGrid control.

Applies to

See also