IsSynchronized Property
For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.
Gets a value indicating whether access to the current ShippingMethodCollection is synchronized (thread-safe).
Namespace: Microsoft.CommerceServer.Orders
Assembly: Microsoft.CommerceServer.Orders.CrossTierTypes (in Microsoft.CommerceServer.Orders.CrossTierTypes.dll)
Syntax
'Declaration
Public ReadOnly Property IsSynchronized As Boolean
'Usage
Dim instance As ShippingMethodCollection
Dim value As Boolean
value = instance.IsSynchronized
public bool IsSynchronized { get; }
public:
virtual property bool IsSynchronized {
bool get () sealed;
}
public final function get IsSynchronized () : boolean
Property Value
Type: System..::.Boolean
true if the collection is synchronized; otherwise, false.
Implements
ICollection..::.IsSynchronized
Remarks
This property is derived from System.Collections.ICollection and is overridden to always return false. For more information on the IsSynchronized property, see the ICollection.IsSynchronized property of the System.Collections.ICollection interface.
Enumerating through a collection is intrinsically not a thread-safe procedure. Even when a collection is synchronized, other threads could still modify the collection, which causes the enumerator to throw an exception. To guarantee thread safety during enumeration, you can either lock the collection during the entire enumeration or catch the exceptions resulting from changes made by other threads.
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
ShippingMethodCollection Class