From c39fdd86ec0d5c0639aed1149f4924aadf822363 Mon Sep 17 00:00:00 2001 From: Kyle Ratti Date: Fri, 23 Sep 2022 21:08:13 -0400 Subject: [PATCH] feat: add ByteHelper --- Base/ByteHelper.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Base/ByteHelper.cs diff --git a/Base/ByteHelper.cs b/Base/ByteHelper.cs new file mode 100644 index 0000000..a4ef8d4 --- /dev/null +++ b/Base/ByteHelper.cs @@ -0,0 +1,13 @@ +namespace FruityFoundation.Base; + +public static class ByteHelper +{ + public static long FromKilobytes(long kilobytes) => + kilobytes * 1024; + + public static long FromMegabytes(long megabytes) => + megabytes * 1024 * 1024; + + public static long FromGigabytes(long gigabytes) => + gigabytes * 1024 * 1024 * 1024; +} \ No newline at end of file