System.Diagnostics.Contracts.PureAttribute Class

Indicates that a type or method is pure, that is, it does not make any visible state changes.

See Also: PureAttribute Members


[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Property | System.AttributeTargets.Event | System.AttributeTargets.Parameter | System.AttributeTargets.Delegate | System.AttributeTargets.All)]
public sealed class PureAttribute : Attribute


Methods and types that are marked with this attribute can be used in calls to System.Diagnostics.Contracts.Contract methods. Pure methods do not make any visible state changes. This attribute is not enforced by the current analysis tools; you should use this attribute only if you are sure that the methods are pure.


Namespace: System.Diagnostics.Contracts
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: