Primitively Primitively
Primitively Primitively
DocFX + Singulink = ♥

Search Results for

    Class ULongAttribute

    This class can be used on a partial record struct to source generate a Primitively IULong type that encapsulates an ulong value.

    Inheritance
    object
    Attribute
    PrimitiveAttribute
    NumericAttribute
    ULongAttribute
    Inherited Members
    PrimitiveAttribute.ImplementIValidatableObject
    Namespace: Primitively
    Assembly: Primitively.Abstractions.dll
    Syntax
    [AttributeUsage(AttributeTargets.Struct, Inherited = false, AllowMultiple = false)]
    public sealed class ULongAttribute : NumericAttribute
    Remarks

    The generated Primitively type will enforce the specified minimum and maximum value constraints.

    Examples

    These examples show how to use the ULong attribute to source generate a Primitively IULong type.

    [ULong]
    public partial record struct Example;
    
    [ULong(Minimum = 100000)]
    public partial record struct Example;
    
    [ULong(Minimum = 20000000, Maximum = 40000000)]
    public partial record struct Example;

    Properties

    Maximum

    Gets or sets the maximum value supported by the source generated Primitively IULong type.

    Declaration
    public ulong Maximum { get; set; }
    Property Value
    Type Description
    ulong

    The default value is 18,446,744,073,709,551,615. An assigned value should not be less than the Minimum value.

    Minimum

    Gets or sets the minimum value supported by the source generated Primitively IULong type.

    Declaration
    public ulong Minimum { get; set; }
    Property Value
    Type Description
    ulong

    The default value is 0. An assigned value should not be greater than the Maximum value.

    © Electronic Hands. All rights reserved.