PDFKit.NET 2.0 Class Library (.NET 2.0)

MetadataSchemaCollection.Contains Method 

Determine whether the MetadataSchema with gicen prefix is in the MetadataSchemaCollection.

public bool Contains(
   string prefix
);

Parameters

prefix
The MetadataSchema to look for.

Return Value

True if the prefix is found in this MetadataSchemaCollection, false otherwise.

Remarks

The prefix does not accept a null reference as a valid value.

Exceptions

Exception Type Condition
ArgumentNullException The given prefix is a null reference.

Example

C#

Document doc = new Document();
doc.Metadata.Create( "tc", "http://www.tallcomponents.com/xmp/schema/v1.0/" );
bool found = doc.Metadata.Contains( "tc" ); //found = true
found = doc.Metadata.Contains( "anotherPrefix" ); //found = false
VB.NET
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.Contains( "tc" ) 'found = True
found = doc.Metadata.Contains( "anotherPrefix" ) 'found = False

See Also

MetadataSchemaCollection Class | TallComponents.PDF.Metadata Namespace