Version

SetField<T> Method

Helper method used by property setters to change the value of a field and raise the PropertyChanged event.
Syntax
'Declaration
 
Protected Overridable Function SetField(Of T)( _
   ByRef member As T, _
   ByVal newValue As T, _
   ByVal propertyName As String _
) As Boolean
protected virtual bool SetField<T>( 
   ref T member,
   T newValue,
   string propertyName
)

Parameters

member
The field member passed by reference that will be updated/compared with the new value
newValue
The new value for the field
propertyName
The name of the property being changed

Type Parameters

T
The type of field being changed

Return Value

Returns false if the new value matches the existing member; otherwise true if the value is different
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also