Meziantou.Framework.ByteSize
4.0.3
Prefix Reserved
dotnet add package Meziantou.Framework.ByteSize --version 4.0.3
NuGet\Install-Package Meziantou.Framework.ByteSize -Version 4.0.3
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Meziantou.Framework.ByteSize" Version="4.0.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Meziantou.Framework.ByteSize" Version="4.0.3" />
<PackageReference Include="Meziantou.Framework.ByteSize" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Meziantou.Framework.ByteSize --version 4.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Meziantou.Framework.ByteSize, 4.0.3"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Meziantou.Framework.ByteSize@4.0.3
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Meziantou.Framework.ByteSize&version=4.0.3
#tool nuget:?package=Meziantou.Framework.ByteSize&version=4.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Meziantou.Framework.ByteSize
ByteSize represent a value in the Byte unit. It can parse, display, and compare values.
// Create an instance of ByteSize
var size = new ByteSize(10); // 10 bytes
_ = ByteSize.FromKiloBytes(10);
_ = ByteSize.From(10, ByteSizeUnit.GigaByte);
_ = ByteSize.Parse("10MB", CultureInfo.InvariantCulture);
_ = ByteSize.TryParse("10MB", out var parsedSize);
_ = ByteSize.TryParse("10MB", CultureInfo.InvariantCulture, out var parsedSizeInvariant);
// Formatting
size.ToString(); // Automatically find the best unit
size.ToString("MB"); // Display the value in megabytes
// Supports B, kB, kiB, MB, MiB, GB, GiB, TB, TiB, PB, PiB, EB, EiB
// Comparisons
var a = ByteSize.FromKiloBytes(1);
var b = ByteSize.FromMegaBytes(1);
_ = a == b;
_ = a != b;
_ = a < b;
_ = a <= b;
_ = a > b;
_ = a >= b;
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. net11.0 is compatible. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- No dependencies.
-
net11.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Meziantou.Framework.ByteSize:
| Package | Downloads |
|---|---|
|
NetcodeHub.Packages.Components.FileUpload
The NetcodeHubFileUpload package provides a versatile and easy-to-use file upload component for Blazor applications. With this package, developers can seamlessly integrate file upload functionality into their applications, allowing users to upload files with ease and efficiency. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.3 | 78 | 9/6/2026 |
| 4.0.2 | 124 | 9/3/2026 |
| 4.0.1 | 1,724 | 7/8/2026 |
| 4.0.0 | 247 | 7/5/2026 |
| 3.0.4 | 141 | 7/5/2026 |
| 3.0.3 | 566 | 6/13/2026 |
| 3.0.2 | 344 | 6/7/2026 |
| 3.0.1 | 522 | 5/23/2026 |
| 3.0.0 | 588 | 5/6/2026 |
| 2.1.9 | 7,163 | 1/18/2026 |
| 2.1.8 | 1,916 | 11/16/2025 |
| 2.1.7 | 1,134 | 10/19/2025 |
| 2.1.6 | 978 | 9/3/2025 |
| 2.1.5 | 951 | 5/25/2025 |
| 2.1.4 | 6,692 | 3/23/2025 |
| 2.1.3 | 296 | 3/1/2025 |
| 2.1.2 | 1,208 | 11/17/2024 |
| 2.1.1 | 8,470 | 11/15/2023 |
| 2.1.0 | 44,319 | 6/12/2022 |
| 2.0.0 | 1,123 | 3/31/2022 |
Loading failed