KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
In code at work, we have many uses of magic strings like the following code snippet: if (user.HasRight("Profile.View")) {...} So there are many places where we pass a string as a parameter to see if the user has a specific right. I don't like that because that generates a lot of magic strings. What would be a better way of doing it? Enum, Constant, class ?
Tags (comma-separated)
Save Edits
Cancel