I have the following simple part of a variable declaration: a class generated by a decompiler
Friend Class Project
Private _Status As Integer
Public Property Status As Integer
Get
Return Me._Status
End Get
Set(ByVal value As Integer)
Interlocked.Exchange(Me._Status, value)
End Set
End Property
End Class
Is there any short form for this ad? In fact, it is used internally by the backgroundworker inside the class and accessed externally by other classes.
To understand the meaning of shorthand. Let me give you an example: The following gode is a shorthand
SyncLock lock
z = 1
End SyncLock
for the next detailed code
Dim obj As Object = Me.lock
ObjectFlowControl.CheckForSyncLockOnValueType(obj)
Dim flag As Boolean = False
Try
Monitor.Enter(obj, flag)
Me.z = 1
Finally
If (flag) Then
Monitor.[Exit](obj)
End If
End Try
source
share