PureAttribute Class
Indicates that a method does not make any observable state changes.
The same as System.Diagnostics.Contracts.PureAttribute.
Namespace:
RingSoft.DataEntryControls.Engine.AnnotationsAssembly: 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 }