Open sandboxFocus

Constructor ExplicitlySynchronizedAttribute

ExplicitlySynchronizedAttribute()

Initializes a new instance of the ExplicitlySynchronizedAttribute class.

Declaration
public ExplicitlySynchronizedAttribute()

ExplicitlySynchronizedAttribute(bool)

Initializes a new instance of the ExplicitlySynchronizedAttribute class and specifies the synchronization strategy.

Declaration
public ExplicitlySynchronizedAttribute(bool appliesToMethodOnly)
Parameters
Type Name Description
bool appliesToMethodOnly

true to avoid adding any synchronization code to the target method, false to add synchronization code that allows the method to access other fields or methods of the target object.