title: How to get a string resource in C# (WPF)?
body: <p>I know how to get a resource from the string resource in XAML:</p>
  
  <pre><code>{Binding OK, Source={StaticResource LocStrings}}
  </code></pre>
  
  <p>However, I want to use a localized string in C# directly, e.g. something like</p>
  
  <pre><code>someString = Resources["LocStrings"]["StringId"];
  </code></pre>
  
  <p>But this does not compile.</p>