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

MustUseReturnValueAttribute Class

Indicates that the return value of the method invocation must be used.

Namespace:  RingSoft.DataEntryControls.WPF
Assembly:  RingSoft.DataEntryControls.WPF (in RingSoft.DataEntryControls.WPF.dll)

Syntax


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

Remarks


Methods decorated with this attribute (in contrast to pure methods) might change state, but make no sense without using their return value.
Similarly to PureAttribute, this attribute will help detecting usages of the method when the return value in not used. Additionally, you can optionally specify a custom message, which will be used when showing warnings, e.g.
C#
[MustUseReturnValue("Use the return value to...")]
.

Inheritance Hierarchy


Object
  Attribute
    RingSoft.DataEntryControls.WPF..::..MustUseReturnValueAttribute