ImmutableAttribute クラス

定義

適用される型、型メンバー、パラメーター、または戻り値を不変として扱う必要があるため、防御コピーは必要ないことを示します。 非シール クラスに適用する場合、派生型は不変であるとは限りません。

[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Field | System.AttributeTargets.Parameter | System.AttributeTargets.Property | System.AttributeTargets.ReturnValue | System.AttributeTargets.Struct, Inherited=false)]
public sealed class ImmutableAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Field | System.AttributeTargets.Parameter | System.AttributeTargets.Property | System.AttributeTargets.ReturnValue | System.AttributeTargets.Struct, Inherited=false)>]
type ImmutableAttribute = class
    inherit Attribute
Public NotInheritable Class ImmutableAttribute
Inherits Attribute
継承
ImmutableAttribute
属性

コンストラクター

ImmutableAttribute()

適用される型、型メンバー、パラメーター、または戻り値を不変として扱う必要があるため、防御コピーは必要ないことを示します。 非シール クラスに適用する場合、派生型は不変であるとは限りません。

適用対象

こちらもご覧ください