title: How to get Enum object by value in C#?
body: <p>I recently encountered a case when I needed to get an <strong>Enum</strong> object by value (to be saved via EF CodeFirst), and here is my <strong>Enum</strong>:</p>
  
  <pre><code>public enum ShipmentStatus {
    New = 0,
    Shipped = 1,
    Canceled = 2
  }
  </code></pre>
  
  <p>So I needed to get <code>ShipmentStatus.Shipped</code> object by value <strong>1</strong>.</p>
  
  <p>So how could I accomplish that?</p>