 | PureAttribute Class |
Indicates that a method does not make any observable state changes.
The same as System.Diagnostics.Contracts.PureAttribute
Inheritance Hierarchy
Namespace: Hangfire.AnnotationsAssembly: Hangfire.Core (in Hangfire.Core.dll) Version: 1.5.0.0
Syntax[AttributeUsageAttribute(AttributeTargets.Method, Inherited = true)]
public sealed class PureAttribute : Attribute
<AttributeUsageAttribute(AttributeTargets.Method, Inherited := true)>
Public NotInheritable Class PureAttribute
Inherits Attribute
The PureAttribute type exposes the following members.
Constructors
| Name | Description |
---|
 | PureAttribute | Initializes a new instance of the PureAttribute class |
Top
Examples[Pure] private int Multiply(int x, int y) { return x * y; }
public void Foo() {
const int a = 2, b = 2;
Multiply(a, b);
}
See Also