title: Why doesn't reflection set a property in a Struct?
body: <pre><code>   class PriceClass {
  
          private int value;
          public int Value
          {
              get { return this.value; }
              set { this.value = value; }
          }           
      }
  
  
      struct PriceStruct
      {
  
          private int value;
          public int Value
          {
              get { return this.value; }
              set { this.value = value; }
          }
      }
      static void Main(string[] args)
      {
          PriceClass _priceClass = new PriceClass();
          Type type = typeof(PriceClass);
          PropertyInfo info = type.GetProperty("Value");
          info.SetValue(_priceClass, 32, null);
          Console.WriteLine(_priceClass.Value);
  
          PriceStruct _priceStruct = new PriceStruct();
          type = typeof(PriceStruct);
          info = type.GetProperty("Value");
          info.SetValue(_priceStruct, 32, null);
          Console.WriteLine(_priceStruct.Value);
  
          Debugger.Break();
      }
  </code></pre>
  
  <p>The first value printed is 32 while the second is 0. No exception thrown</p>