title: How to hide set method of an implemented property from an interface in C#?
body: <p>Greetings everyone...</p>
  
  <p>If I have the following interface:</p>
  
  <pre><code>interface IMyInterface
  {
      int property { get; set; }
  }
  </code></pre>
  
  <p>And the following implementation:</p>
  
  <pre><code>class MyClass : IMyInterface
  {
  // anything
  }
  </code></pre>
  
  <p>How can I hide the <code>set</code> method of property from the instances of <code>MyClass</code>... In other words, I don't want the <code>set</code> method of <code>property</code> to be public, is that possible?</p>
  
  <p>It would be easy to do with abstract class:</p>
  
  <pre><code>abstract class IMyInterface
  {
      int property { get; protected set; }
  }
  </code></pre>
  
  <p>Then I could only <code>set</code> the <code>property</code> within the class that implements the abstract class above...</p>