PyrotechUtilities 1.3.5

dotnet add package PyrotechUtilities --version 1.3.5
                    
NuGet\Install-Package PyrotechUtilities -Version 1.3.5
                    
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="PyrotechUtilities" Version="1.3.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="PyrotechUtilities" Version="1.3.5" />
                    
Directory.Packages.props
<PackageReference Include="PyrotechUtilities" />
                    
Project file
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 PyrotechUtilities --version 1.3.5
                    
#r "nuget: PyrotechUtilities, 1.3.5"
                    
#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 PyrotechUtilities@1.3.5
                    
#: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=PyrotechUtilities&version=1.3.5
                    
Install as a Cake Addin
#tool nuget:?package=PyrotechUtilities&version=1.3.5
                    
Install as a Cake Tool

PyrotechUtilities

A small utilities package, with some extension methods that I use all the time.

Enum Extensions

Some useful extension methods for working with Enums.

  • [Identification] attribute, is an attribute to be applied to an Enum value, which helps to identify the value. This is useful especially when using the [Description] attriute for the UI, and you need a clean separation between how the value is displayed and how it is identified.
  • GetIdentification() is an extension method to get the value of the [Identification] attribute.
  • GetDescription() is an extension method to get the value of the [Description] attribute.
  • GetEnum<T> is an extension method for a string value that will attempt to get the corresponding Enum value. It will use the [Identification] attribute if it exists, then the [Description] attribute or try to just parse the value.
  • GetAllValuesAndDescriptions<T> is an extension method to take an Enum, and create an IEnumerable that has the Enum value as well as the string description. This is particularly useful when building UI's and you need to provide the user with a Dropdown/Select of Enum values.

DateOnly Extensions

Extensions for converting DateTime types to and from DateOnly types. (Only available from .Net 6.0)

  • ToDateTime() will convert a DateOnly to a DateTime (works for DateOnly? as well)
  • ToDateOnly() will convert a DateTime to a DateOnly (works fro DateTime? as well)

Numeric Extensions

Extensions for Numeric types (int, double, decimal etc.)

  • ToFileSize() will convert a numeric value into a string representing the file size in KB or MB
Product 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 is compatible.  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 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. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 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 2.1

    • No dependencies.
  • net10.0

    • No dependencies.
  • net8.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
1.3.5 450 11/20/2025