TryAdd Method
See Also 
SourceCode.Collections.Concurrent Namespace > IProducerConsumerCollection<T> Interface : TryAdd Method



item

Glossary Item Box

Syntax

Visual Basic (Declaration)  
Function TryAdd( _
   ByVal item As T _
) As Boolean
Visual Basic (Usage) Copy Code
Dim instance As IProducerConsumerCollection(Of T)
Dim item As T
Dim value As Boolean
 
value = instance.TryAdd(item)
C#  
bool TryAdd( 
   T item
)
C++/CLI  
bool TryAdd( 
   T^ item
) 

Parameters

item

Requirements

Target Platforms: 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