DocumentSetVersionCollection.Contains Method
Determines whether the collection contains a document set snapshot with the specified label.
Namespace: Microsoft.Office.DocumentManagement.DocumentSets
Assembly: Microsoft.Office.DocumentManagement (in Microsoft.Office.DocumentManagement.dll)
Syntax
'Declaration
Public Function Contains ( _
label As String _
) As Boolean
'Usage
Dim instance As DocumentSetVersionCollection
Dim label As String
Dim returnValue As Boolean
returnValue = instance.Contains(label)
public bool Contains(
string label
)
Parameters
label
Type: System.StringThe snapshot version label to locate in the DocumentSetVersionCollection object.
Return Value
Type: System.Boolean
true if snapshot with label specified by label parameter exists in the collection;otherwise, false.
Exceptions
Exception | Condition |
---|---|
InvalidOperationException | Cannot work with snapshot because versioning is not enabled on the parent SPList object. |
ArgumentNullException | The value cannot be set to a null reference (Nothing in Visual Basic) or set to Empty.String. (ArgumentException.ParamName="label") |
See Also
Reference
DocumentSetVersionCollection Class