RingSoft.DataEntryControls.Engine.Annotations Namespace
RingSoft.DataEntryControls.WPF Namespace

PureAttribute Class

Indicates that a method does not make any observable state changes. The same as System.Diagnostics.Contracts.PureAttribute.

Namespace:  RingSoft.DataEntryControls.Engine.Annotations
Assembly:  RingSoft.DataEntryControls.Engine (in RingSoft.DataEntryControls.Engine.dll)

Syntax


[AttributeUsageAttribute]
public sealed class PureAttribute : Attribute
<AttributeUsageAttribute> _
Public NotInheritable Class PureAttribute _
	Inherits Attribute
[AttributeUsageAttribute]
public ref class PureAttribute sealed : public Attribute

Examples


C#
[Pure] int Multiply(int x, int y) => x * y;
void M() {
Multiply(123, 42); // Warning: Return value of pure method is not used
}

Inheritance Hierarchy


Object
  Attribute
    RingSoft.DataEntryControls.Engine.Annotations..::..PureAttribute