Version

Add(Object) Method

Adds an item to the collection
Syntax
'Declaration
 
Public Overloads Function Add( _
   ByVal dataValue As Object _
) As ValueListItem
public ValueListItem Add( 
   object dataValue
)

Parameters

dataValue
The value to compare and the display text.

Return Value

The newly added item
Remarks

Note: When ValueListItems are added via this overload, the item's DisplayText property will be automatically set to the string representation of the dataValue parameter. Also note that if the dataValue parameter contains a ValueListItem, and the item's DataValue property was not explitly set, it will remain null. If two or more items have the same DataValue, your application may behave unexpectedly, since the items are not unique.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also