title: C# Setter doesn't work at all. It doesn't invoke any code
body: <p>I'm trying to change <code>Cents</code> in following code. But i 've been stuck for almost an hour. I just can't change this Cents. Setter inside of Cents doesn't work at all. It doesn't change value and even when I make <code>Console.WriteLine(&quot;It's been written in Cents setter&quot;);</code> It's not invoked too.</p>
  <pre><code>using System;
  using System.Collections;
  using System.Collections.Generic;
  class Program
      {
  
  
          static void Main(string[] args)
          {
          BankAccount a = new BankAccount(50,200);
          Console.WriteLine(a.Cents);
  
          Console.ReadLine();
          }
      }
  
  
  class BankAccount
  {
      public BankAccount(uint dollars,uint cents)
      {
          this.Dollars = dollars;
          this.cents = cents;
      }
      public uint Dollars { get; private set;}
      private uint cents;
      public uint Cents
      {
          get 
          {
              return cents;
          }
          private set
          {
              cents = 500; //It doesnt change
              Console.WriteLine(&quot;It's been written in Cents setter&quot;); // I can't invoke it
          }
      }
  }
  </code></pre>