Skip to content

Add a ByteSpeed type which combines ByteSize & TimeSpan #52

@AdamCoulterOz

Description

@AdamCoulterOz

Example:

ByteSize size = ByteSize.FromBytes(1000);
TimeSpan time = TimeSpan.FromSeconds(5);

// use dotnet operator overloading to support basic operations (/, *) for various combinations of:

ByteSpeed speed = (ByteSize) size /  (TimeSpan) time;
TimeSpan   time = (ByteSize) size / (ByteSpeed) speed;
ByteSize   size = (TimeSpan) time * (ByteSpeed) speed;

// ByteSpeed would be a new type

// It would support all the same ToString / Largest operations as ByteSize:
// - LargestWholeNumberValue / given time unit... e.g. second, minute, etc
// - LargestWholeNumberSymbol / given time unit... e.g. second, minute, etc
// with automatic formatting

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions