ITypedList.GetListName(PropertyDescriptor[]) Method

Definition

Returns the name of the list.

C#
public string GetListName(System.ComponentModel.PropertyDescriptor[]? listAccessors);
C#
public string GetListName(System.ComponentModel.PropertyDescriptor[] listAccessors);

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.

C#
// 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;
}

Remarks

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

Applies to

Product Versions
.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, 10
.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

See also