title: Accept only certain strings for a method in C#
body: <p>I've created a method in C# as you can see below</p>
  
  <pre><code>public static IEnumerable&lt;User&gt; QueryTheAD(string filter, string identifier) {
    if ( filter == "ANiceString" ) {
      // sexy code here
    }
  }
  </code></pre>
  
  <p>which works well. However VS rightly shows that not all code path returns a value.</p>
  
  <p>So is it therefore possible for me to specify that filter can only be one of these:</p>
  
  <ul>
  <li>"Tutor"</li>
  <li>"Year"</li>
  <li>"SecondName"</li>
  </ul>