Skip to content

Is there a reason, the conversion properties return double for quantities with base type decimal? #1058

Closed
@pgrawehr

Description

@pgrawehr

Some quantities, for instance information have decimal as base type (which does make sense). However, except for the Value property, all properties return double:

/// <summary>
///     Gets a <see cref="double"/> value of this quantity converted into <see cref="InformationUnit.Bit"/>
/// </summary>
public double Bits => As(InformationUnit.Bit);

/// <summary>
///     Gets a <see cref="double"/> value of this quantity converted into <see cref="InformationUnit.Byte"/>
/// </summary>
public double Bytes => As(InformationUnit.Byte);

This is a bit confusing and unnecessarily looses precision. Would it be possible to change these properties to decimal, too?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementpinnedIssues that should not be auto-closed due to inactivity.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions