public MustUseAttribute()Initializes a new instance of the MustUseAttribute class.
All Types / Ferrous
public sealed class MustUseAttribute : Attribute
Indicates that a return value or an instance of the annotated type should not be silently ignored. Equivalent to Rust's #[must_use] attribute.
public MustUseAttribute()Initializes a new instance of the MustUseAttribute class.
public MustUseAttribute(string reason)Initializes a new instance of the MustUseAttribute class with an explanatory reason.
reasonpublic string? ReasonGets the optional reason explaining why the value must be used.