title: How do I translate this dynamic collection expression from VB.NET into C#?
body: <p>I have this very succinct expression in vb.NET which makes it easy to test to see if a value is in a list of known string literals but I don't know how to translate it to C#. (It is made all the more difficult because I cannot search for it knowing exactly how to describe what the name of this type of expression is)</p>
  <pre><code>Dim test as String = &quot;test&quot;
  If {&quot;test&quot;, &quot;test2&quot;}.Contains(test) Then
  
  End If
  </code></pre>