Gets or sets the property to display for this ListControl.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
public function get DisplayMember () : String public function set DisplayMember (value : String)
The controls that inherit from ListControl can display diverse types of objects. If the specified property does not exist on the object or the value of is an empty string (""), the results of the object's ToString method are displayed instead.
If the new display member cannot be set, the previous display member setting is maintained.
The following code example is a complete application that shows how you can use DataSource, , ValueMember, and SelectedValue members of the ListControl class as implemented by the ListBox class. The example loads an ArrayList and the list box. When the user selects an item in the list box, the selected value is used to return the data associated with the selected item.
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98, Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.