TryGetCatalog Method
Returns a value indicating if the specified InventoryCatalog is within the InventoryCatalogCollection. This method also returns the specified InventoryCatalog.
Namespace: Microsoft.CommerceServer.Inventory
Assembly: Microsoft.CommerceServer.Catalog (in Microsoft.CommerceServer.Catalog.dll)
Syntax
'Declaration
Public Function TryGetCatalog ( _
catalogName As String, _
<OutAttribute> ByRef inventoryCatalog As InventoryCatalog _
) As Boolean
'Usage
Dim instance As InventoryCatalogCollection
Dim catalogName As String
Dim inventoryCatalog As InventoryCatalog
Dim returnValue As Boolean
returnValue = instance.TryGetCatalog(catalogName, _
inventoryCatalog)
public bool TryGetCatalog(
string catalogName,
out InventoryCatalog inventoryCatalog
)
public:
bool TryGetCatalog(
String^ catalogName,
[OutAttribute] InventoryCatalog^% inventoryCatalog
)
public function TryGetCatalog(
catalogName : String,
inventoryCatalog : InventoryCatalog
) : boolean
Parameters
- catalogName
Type: System..::.String
The name of the inventory catalog.
- inventoryCatalog
Type: Microsoft.CommerceServer.Inventory..::.InventoryCatalog%
The InventoryCatalog object for the specified inventory catalog if the inventory catalog exists in the collection.
Return Value
Type: System..::.Boolean
true if the inventory catalog exists in the collection; otherwise false.
Remarks
Returns the InventoryCatalog object for the specified inventory catalog if the inventory catalog exists in the collection. This method returns to true if the inventory catalog exists in the collection false if the inventory catalog does not exist in the collection. If this method returns false then the inventoryCatalog object will be nullNothingnullptra null reference (Nothing in Visual Basic).
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
InventoryCatalogCollection Class