ByteSize
ByteSize copied to clipboard
Add a ByteSpeed type which combines ByteSize & TimeSpan
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