A property of the MyBase (base) object that does not display the actual value in the debugger

So, I get a wrapped IM from a colleague saying that the if statement skips when

If true Then
    DoSomething
End IF

Actual code

If MyBase.IsDirty Then
    DoSomething
End IF

C # Version

if(base.IsDirty)
{
    DoSomething();
}

, If , , MyBase.IsDirty ? " !". , , , MyBase.IsDirty, , , ?MyBase.IsDirty . , , - , , , ( , ),

Dim dirty As Boolean = MyBase.IsDirty

, , , false.

? , , MyBase , , 100%.

Edit

, MyBase.IsDirty

Get :

<Browsable(False)> _
    Public Overridable ReadOnly Property IsDirty() As Boolean Implements IEditableBusinessObject.IsDirty
      Get
        Return IsSelfDirty OrElse (_fieldManager IsNot Nothing AndAlso FieldManager.IsDirty())
      End Get
    End Property

<Browsable(False)> _
    Public Overridable ReadOnly Property IsSelfDirty() As Boolean Implements IEditableBusinessObject.IsSelfDirty
      Get
        Return _isDirty
      End Get
    End Property

_isDirty

( ).

, CSLA 3.5.3.0

MyBase.IsDirty, Rocky Lhotka , CSLA.

+3
1

, base ( MyBase VB), API . , , , . , , , .

, false , , . base. .

MSDN " #"

+6

Source: https://habr.com/ru/post/1786166/


All Articles