DeployLX Software Protection System

Limit..::..AssertNotReadOnly Method

Asserts that the Limit is not read only. Use before setting the value of a property.

Syntax

Protected Sub AssertNotReadOnly
protected void AssertNotReadOnly()

Examples

This example demonstrates how to protect the set method of a limit property from unauthorized modification.
Visual Basic
Public Property VariableName() As String
    Get
        Return _variableName
    End Get
    Set
        AssertNotReadOnly()
        If _variableName <> Value Then
            _variableName = Value
            OnChanged("VariableName")
        End If
    End Set
End Property
Private _variableName As String
C#
public string VariableName
{
    get { return _variableName; }
    set {
        AssertNotReadOnly();
        if( _variableName != value )
        {
            _variableName = value;
            OnChanged( "VariableName" );
        }
    }
}
private string _variableName;

Assembly:  DeployLX.Licensing.v5 (in DeployLX.Licensing.v5.dll)

See Also