title: .Net - Strategies to avoid magic string
body: <p>In code at work, we have many uses of magic strings like the following code snippet:</p>
  
  <pre><code>if (user.HasRight("Profile.View")) {...}
  </code></pre>
  
  <p>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.</p>
  
  <p>What would be a better way of doing it?</p>
  
  <p>Enum, Constant, class ?</p>