Determine whether the MetadataSchema with gicen prefix is in the MetadataSchemaCollection.
Namespace: TallComponents.PDF.Layout.MetadataAssembly: TallComponents.PDF.Layout (in TallComponents.PDF.Layout.dll) Version: 3.0.63.0
Syntax
| C# |
|---|
public bool Contains( string prefix ) |
| Visual Basic |
|---|
Public Function Contains ( _ prefix As String _ ) As Boolean |
Parameters
- prefix
- Type: System..::..String
The MetadataSchema to look for.
Return Value
True if the prefix is found in this MetadataSchemaCollection, false otherwise.
Remarks
The prefix does not accept nullNothingnullptra null reference (Nothing in Visual Basic) as a valid value.
Examples
C#
CopyC#
VB.NET
CopyC#
Document doc = new Document(); doc.Metadata.Create( "tc", "http://www.tallcomponents.com/xmp/schema/v1.0/" ); bool found = doc.Metadata.<b>Contains</b>( "tc" ); //found = true found = doc.Metadata.<b>Contains</b>( "anotherPrefix" ); //found = false
Dim doc as Document = new Document() doc.Metadata.Create( "tc", "http://www.tallcomponents.com/xmp/schema/v1.0/" ) Dim found as Boolean found = doc.Metadata.<b>Contains</b>( "tc" ) 'found = True found = doc.Metadata.<b>Contains</b>( "anotherPrefix" ) 'found = False
Exceptions
| Exception | Condition |
|---|---|
| System..::..ArgumentNullException | The given prefix is nullNothingnullptra null reference (Nothing in Visual Basic). |