Click or drag to resize
PureAttribute Class
Indicates that a method does not make any observable state changes. The same as [!:System.Diagnostics.Contracts.PureAttribute]
Inheritance Hierarchy
SystemObject
  SystemAttribute
    Slash.Diagnostics.ReSharper.AnnotationsPureAttribute

Namespace: Slash.Diagnostics.ReSharper.Annotations
Assembly: Slash.Diagnostics (in Slash.Diagnostics.dll) Version: 1.0.6018.40181
Syntax
public sealed class PureAttribute : Attribute

The PureAttribute type exposes the following members.

Constructors
  NameDescription
Public methodPureAttribute
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); // Waring: Return value of pure method is not used
}
See Also