|
SI2ToScaledString(Int64, String, String, Int64, Int64) Method
|
Turns the given number of units (e.g., bytes) into a textual representation with an appropriate unit scaling
and common named representation (e.g., KB, MB, GB, TB, etc.).
Namespace: GSF.UnitsAssembly: GSF.Core (in GSF.Core.dll) Version: 2.4.207-beta+1781b796b2aa7a54013a031eb432fe4ccee31867
Syntax public static string ToScaledString(
long totalUnits,
string format,
string unitName,
long minimumFactor = 1024,
long maximumFactor = 1152921504606846976
)
Public Shared Function ToScaledString (
totalUnits As Long,
format As String,
unitName As String,
Optional minimumFactor As Long = 1024,
Optional maximumFactor As Long = 1152921504606846976
) As String
static member ToScaledString :
totalUnits : int64 *
format : string *
unitName : string *
?minimumFactor : int64 *
?maximumFactor : int64
(* Defaults:
let _minimumFactor = defaultArg minimumFactor 1024
let _maximumFactor = defaultArg maximumFactor 1152921504606846976
*)
-> string
GSF.Units.SI2.ToScaledString = function(totalUnits, format, unitName, minimumFactor, maximumFactor);
View SourceParameters
- totalUnits Int64
- Total units to represent textually.
- format String
- A numeric string format for scaled totalUnits.
- unitName String
- Name of unit display (e.g., you could use "B" for bytes).
- minimumFactor Int64 (Optional)
- Optional minimum SI factor. Defaults to Kilo.
- maximumFactor Int64 (Optional)
- Optional maximum SI factor. Defaults to Exa.
Return Value
StringA
String representation of the number of units.
Exceptions Remarks Symbols array is used for displaying SI symbol prefix for
unitName.
See Also