Determine whether an Action is in the ActionCollection.
Namespace: TallComponents.PDF.Layout.ActionsAssembly: TallComponents.PDF.Layout (in TallComponents.PDF.Layout.dll) Version: 3.0.63.0
Syntax
| C# |
|---|
public bool Contains( Action action ) |
| Visual Basic |
|---|
Public Function Contains ( _ action As Action _ ) As Boolean |
Parameters
- action
- Type: TallComponents.PDF.Layout.Actions..::..Action
The Action to verify.
Return Value
True if the Action is found in this ActionCollection, false otherwise.
Remarks
The action does not accept a nullNothingnullptra null reference (Nothing in Visual Basic) as a valid value.
Examples
C#
CopyC#
VB.NET
CopyC#
GoToAction goToAction = new GoToAction( page ); UriAction uriAction = new UriAction( "http://www.tallcomponents.com" ); ActionCollection actions = new ActionCollection(); actions.Add( goToAction ); bool found = actions.<b>Contains</b>( goToAction ); //found = true found = actions.<b>Contains</b>( uriAction ); //found = false
Dim goToAction1 as GoToAction = new GoToAction( page ) Dim uriAction1 as UriAction = new UriAction( "http://www.tallcomponents.com" ) Dim actions as ActionCollection = new ActionCollection() actions.Add( goToAction1 ) Dim found as Boolean found = actions.<b>Contains</b>( goToAction1 ) 'found = True found = actions.<b>Contains</b>( uriAction1 ) 'found = False
Exceptions
| Exception | Condition |
|---|---|
| System..::..ArgumentNullException | The given action is nullNothingnullptra null reference (Nothing in Visual Basic). |