ITypedList.GetListName(PropertyDescriptor[]) Method
In this article
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
- listAccessors
- PropertyDescriptor[]
An array of PropertyDescriptor objects, for which the list name is returned. This can be null
.
The name of the list.
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
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 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: