HasProperty Method
Returns true if the underlying dataset contains the specified property.
Namespace: Microsoft.CommerceServer.Inventory
Assembly: Microsoft.CommerceServer.Catalog (in Microsoft.CommerceServer.Catalog.dll)
Syntax
'Declaration
Public Function HasProperty ( _
propertyName As String _
) As Boolean
'Usage
Dim instance As InventorySku
Dim propertyName As String
Dim returnValue As Boolean
returnValue = instance.HasProperty(propertyName)
public bool HasProperty(
string propertyName
)
public:
bool HasProperty(
String^ propertyName
)
public function HasProperty(
propertyName : String
) : boolean
Parameters
- propertyName
Type: System..::.String
The property name.
Return Value
Type: System..::.Boolean
Returns true if the underlying dataset contains the specified property; otherwise returns false.
Remarks
Performs a query of the underlying database to determine if there is a column for the specified propertyName. Using this method allows you to determine if there is the specified property without using the indexer and possibly throwing an exception. The returned value is true if the underlying dataset contains the specified property; otherwise false is returned.
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.