SmartEnum
Enums.NET
Our great sponsors
SmartEnum | Enums.NET | |
---|---|---|
7 | 4 | |
2,050 | 1,648 | |
- | - | |
8.2 | 3.6 | |
11 days ago | 3 months ago | |
C# | C# | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
SmartEnum
- Java or C# for backed
-
Is there a "right" way to consolidate constants in C#/.NET?
I agree SmartEnum is my go-to for this
-
best practice to create a method with params of limited values
If we knew more about these methods and what kinds of parameters they take we could maybe make some suggestions. There are some patterns like smart enum that are sometimes just the thing.
-
Smart Enums In C# Like Java
In C# I am not able to add constructors, properties, and methods. although there is a library to do this https://github.com/Ardalis/SmartEnum but wouldn't be nice if we have this feature built-in to C#.
- What is it about C# that you do NOT like compared to other languages?
-
Displaying Enums with custom value
You can use the SmartEnum library.
- C# records can be used to emulate Java's fancy enums.
Enums.NET
- Need to replicate IntelliSense behavior for enums but using strings for keys
-
What is it about C# that you do NOT like compared to other languages?
If you deal with Enums regularly, Enum.NET is a must have: https://github.com/TylerBrinkley/Enums.NET.
-
How to store string alongside value in discriminated union?
I guess you use a reflection-based library / nuget package to read those attributes. You can still do this in F#. The equivalent declaration and how to read it back using [Enums.Net](https://www.nuget.org/packages/Enums.NET/) would be:
What are some alternatives?
SmartAnnotations - A library for .NET that uses source generators to automatically generate data annotations for your models.
FluentValidation - A popular .NET validation library for building strongly-typed validation rules.
csharplang - The official repo for the design of the C# programming language
CsvHelper - Library to help reading and writing CSV files
Result - A result abstraction that can be mapped to HTTP response codes if needed.
Jint - Javascript Interpreter for .NET
NodaTime - A better date and time API for .NET
Mediator.Net - A simple mediator for .Net for sending command, publishing event and request response with pipelines supported
UnitsNet - Makes life working with units of measurement just a little bit better.
Aeron.NET - Efficient reliable UDP unicast, UDP multicast, and IPC message transport - .NET port of Aeron
.NET Runtime - .NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
Humanizer - Humanizer meets all your .NET needs for manipulating and displaying strings, enums, dates, times, timespans, numbers and quantities