Alyio.Extensions
2.3.2
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Alyio.Extensions --version 2.3.2
NuGet\Install-Package Alyio.Extensions -Version 2.3.2
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="Alyio.Extensions" Version="2.3.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Alyio.Extensions" Version="2.3.2" />
<PackageReference Include="Alyio.Extensions" />
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 Alyio.Extensions --version 2.3.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Alyio.Extensions, 2.3.2"
#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 Alyio.Extensions@2.3.2
#: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=Alyio.Extensions&version=2.3.2
#tool nuget:?package=Alyio.Extensions&version=2.3.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Alyio.Extensions
Alyio.Extensions is a .NET library that provides extension methods for converting between base data types. It supports .NET Standard 1.3 and 2.0, making it compatible with a wide range of .NET applications.
Features
- Object Extensions: Methods for converting objects to various data types
- String Extensions: String manipulation and conversion utilities
- DateTime Extensions: DateTime formatting and conversion helpers
- Byte Extensions: Byte array conversion utilities
Installation
You can install the package via NuGet:
dotnet add package Alyio.Extensions
Or using the NuGet Package Manager:
Install-Package Alyio.Extensions
Usage
using Alyio.Extensions;
// String to number conversion - returns null if conversion fails
string validNumber = "123";
int? convertedNumber = validNumber.ToInt32(); // Returns 123
string invalidNumber = "abc";
int? failedNumber = invalidNumber.ToInt32(); // Returns null because "abc" cannot be converted to int
// Object conversion - returns null if conversion fails
object validValue = "42";
int? validResult = validValue.ToInt32(); // Returns 42
object invalidValue = "not a number";
int? invalidResult = invalidValue.ToInt32(); // Returns null because "not a number" cannot be converted to int
// DateTime parsing - returns null if parsing fails
string validDate = "2024-03-20";
DateTime? validDateTime = validDate.ToDateTime(); // Returns DateTime object
string invalidDate = "not a date";
DateTime? invalidDateTime = invalidDate.ToDateTime(); // Returns null because "not a date" cannot be parsed
// Handling conversion results
string? input = "123";
int result = input.ToInt32() ?? -1; // Returns 123 if conversion succeeds, -1 if it fails
Supported Frameworks
- .NET Standard 1.3
- .NET Standard 2.0
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Author
Jon X
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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. |
| .NET Core | netcoreapp1.0 was computed. netcoreapp1.1 was computed. netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard1.3 is compatible. netstandard1.4 was computed. netstandard1.5 was computed. netstandard1.6 was computed. netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen30 was computed. tizen40 was computed. tizen60 was computed. |
| Universal Windows Platform | uap was computed. uap10.0 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 1.3
- NETStandard.Library (>= 1.6.1)
-
.NETStandard 2.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.6.0 | 326 | 11/13/2025 |
| 2.5.1 | 327 | 9/26/2025 |
| 2.5.1-preview.10 | 114 | 9/26/2025 |
| 2.3.2 | 356 | 6/9/2025 |
| 2.3.1 | 305 | 3/15/2024 |
| 2.3.0 | 488 | 10/20/2023 |
| 2.1.0 | 654 | 5/28/2022 |
| 2.0.0 | 3,057 | 8/22/2017 |
| 1.1.2 | 1,922 | 8/4/2017 |
| 1.1.1 | 1,774 | 6/9/2017 |
| 1.1.0 | 1,700 | 5/7/2017 |
| 1.0.2 | 1,696 | 4/5/2017 |
| 1.0.1 | 1,802 | 12/22/2016 |
| 1.0.0 | 1,724 | 12/19/2016 |