microsoft/FeatureManagement-Dotnet

Change the feature flag name reference to const string

Closed this issue · 3 comments

Currently, our testcases are using Enum.GetName(typeof(Features), Features.TargetingTestFeature) to reference a feature flag.

FeatureFlagDemo example project should also be updated.

Could you explain what's wrong with name reference?

Also, I'm aslo wondering why not just use nameof? For example, nameof(Features.TargetingTestFeature), which sounds pretty simple and straightforward.

@juniwang The context is here: #268 #269
Jimmy and I discussed this offline. We prefered to use const string. There was also a PR to update the README: #275