[Home] Type Microsoft.FSharp.Core.DefaultValueAttribute


Adding this attribute to a field declaration means that the field is not initialized in the turns off the generation of standard helper member tester, constructor and accessor members for the generated .NET class for that type. During type checking constraint is asserted that the field type support 'null'. If the 'check' value is false then the constraint is not asserted.

Full Type Signature

[<AttributeUsage (enum<AttributeTargets> (256))>]
type DefaultValueAttribute = class
                               inherit Attribute
                             end
                             with
                               new : check:bool -> DefaultValueAttribute
                               new : unit -> DefaultValueAttribute
                               member Check : bool
                             end

Instance Members

MemberDescription
member Check : bool

Static Members

MemberDescription
new : check:bool -> DefaultValueAttribute
new : unit -> DefaultValueAttribute

See Also

Microsoft.FSharp.Core


Documentation for assembly FSharp.Core, version 1.9.4.19, generated using F# version 1.9.4.19