Mastronardi.Utils.Enums 1.1.3

Prefix Reserved
dotnet add package Mastronardi.Utils.Enums --version 1.1.3                
NuGet\Install-Package Mastronardi.Utils.Enums -Version 1.1.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="Mastronardi.Utils.Enums" Version="1.1.3" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Mastronardi.Utils.Enums --version 1.1.3                
#r "nuget: Mastronardi.Utils.Enums, 1.1.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.
// Install Mastronardi.Utils.Enums as a Cake Addin
#addin nuget:?package=Mastronardi.Utils.Enums&version=1.1.3

// Install Mastronardi.Utils.Enums as a Cake Tool
#tool nuget:?package=Mastronardi.Utils.Enums&version=1.1.3                

Enum utilities

Enums are very usefull, but they lack a nice textual representation... what if you would like to give them a readable description, and use that in dropdowns and such? Well, thats hard to do... Not anymore.

You can add a System.ComponentModel.DescriptionAttribute and then get it with the following method:

var description = EnumFunctions.GetDescription(enumValue)

But that is only one item, how about the dropdown boxes? And how about if you want to use a Character as its value? Or just the enum string representation and its description? Here you go:

var dictionary1 = EnumFunctions.GetListItems(typeof(EnumType)); // Key = EnumStringName, Value = Description
var dictionary2 = EnumFunctions.GetIntegerListItems(typeof(EnumType)); // Key = Integer value, Value = Description
var dictionary3 = EnumFunctions.GetCharacterListItems(typeof(EnumType)); // Key = character value, Value = Description

In all cases: when there is no description, the string representation will be used as the description.

Check Mastronardi.Utils.Extensions for the extension methods offering the same functionality
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 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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 is compatible. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net40 is compatible.  net403 was computed.  net45 was computed.  net451 was computed.  net452 was computed.  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 tizen40 was computed.  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.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on Mastronardi.Utils.Enums:

Package Downloads
Mastronardi.Utils.Extensions

The Extensions utils are there to offer lots of extensions for Dates, enums, images, Numbers, Strings and others

Mastronardi.Utils.Web

The Web utils help working with HTML, cleaning HTML, Parsing it, Parsing CSS, Embedding images, Querystring handling

Mastronardi.Utils.Web.UI

The Web utils UI contain serveral UI Webcontrols for ASP.NET forms

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.3 627 10/10/2022
1.0.0 263 8/28/2023