Share via


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

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

See Also

Reference

InventoryCatalogCollection Class

InventoryCatalogCollection Members

Microsoft.CommerceServer.Inventory Namespace