ardalis / ardalis/SmartEnum

Could not override SmartEnum.Value

Open
#388 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
2.4k
Forks
184
PR merge metrics
No merged PRs in 30d

Description

I have downloaded SmartEnum because I wanted enum with double values.

This is not possible as Value property could not be overrided.

Integer value should be hidden within enum in original class and unaccessible when overriden with other data type.

So that my class CrossSection.PointTwoFive.Value will result in "0.25".

![image](https://user-images.githubusercontent.com/78303208/230905915-59d93572-3452-4333-b84f-ef703ccdc77d.png)

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the SmartEnum base class and the CrossSection example shown in the issue, focusing on how Value is defined and exposed. Determine whether a double-valued enum can be supported without exposing the original integer value. Done means the requested CrossSection.PointTwoFive.Value behavior is supported and existing SmartEnum behavior remains intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.