Skip to content
Snippets Groups Projects
Commit 80eb66e5 authored by Niko Ehrenfeuchter's avatar Niko Ehrenfeuchter :keyboard:
Browse files

Add wrapper method for megabytes to human readable.

Refers to #24
parent ab68a3ba
No related branches found
No related tags found
No related merge requests found
......@@ -16,7 +16,16 @@
order++;
numBytes /= 1024;
}
return $"{numBytes:0.#} {suffixes[order]}";
}
/// <summary>
/// Wrapper to convert megabytes into human-readable size string.
/// See <see cref="BytesToString"/> for more details.
/// </summary>
public static string MegabytesToString(long megaBytes) {
return BytesToString(megaBytes * MegaBytes);
}
}
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment