Table of Contents

Class SizeUnit

Namespace
BenchmarkDotNet.Columns
Assembly
BenchmarkDotNet.dll
public class SizeUnit : IEquatable<SizeUnit>
Inheritance
SizeUnit
Implements

Constructors

SizeUnit(string, string, long)

public SizeUnit(string name, string description, long byteAmount)

Parameters

name string
description string
byteAmount long

Fields

All

public static readonly SizeUnit[] All

Field Value

SizeUnit[]

B

public static readonly SizeUnit B

Field Value

SizeUnit

GB

public static readonly SizeUnit GB

Field Value

SizeUnit

KB

public static readonly SizeUnit KB

Field Value

SizeUnit

MB

public static readonly SizeUnit MB

Field Value

SizeUnit

TB

public static readonly SizeUnit TB

Field Value

SizeUnit

Properties

ByteAmount

public long ByteAmount { get; }

Property Value

long

Description

public string Description { get; }

Property Value

string

Name

public string Name { get; }

Property Value

string

Methods

Convert(long, SizeUnit, SizeUnit)

public static double Convert(long value, SizeUnit from, SizeUnit to)

Parameters

value long
from SizeUnit
to SizeUnit

Returns

double

Equals(SizeUnit)

public bool Equals(SizeUnit other)

Parameters

other SizeUnit

Returns

bool

Equals(object)

public override bool Equals(object obj)

Parameters

obj object

Returns

bool

GetBestSizeUnit(params long[])

public static SizeUnit GetBestSizeUnit(params long[] values)

Parameters

values long[]

Returns

SizeUnit

GetHashCode()

public override int GetHashCode()

Returns

int

ToValue(long)

public SizeValue ToValue(long value = 1)

Parameters

value long

Returns

SizeValue

Operators

operator ==(SizeUnit, SizeUnit)

public static bool operator ==(SizeUnit left, SizeUnit right)

Parameters

left SizeUnit
right SizeUnit

Returns

bool

operator !=(SizeUnit, SizeUnit)

public static bool operator !=(SizeUnit left, SizeUnit right)

Parameters

left SizeUnit
right SizeUnit

Returns

bool