title: Can a property name and a method name be same in C#?
body: <p>I have a class which contains a property:</p>
  
  <pre><code>public bool IsMandatory {get;set;}
  </code></pre>
  
  <p>Now I am adding a method <code>IsMandatory(string str)</code>.</p>
  
  <pre><code>public bool IsMandatory(string str)
  {
    //return false;
    //return true;
  }
  </code></pre>
  
  <p>I am getting a compile time error that </p>
  
  <blockquote>
    <p><em>the type already contains a definition for 'IsMandatory'</em></p>
  </blockquote>
  
  <p>Can't a method name and property name be same in C# ? We use a method and property in different way, why is this giving compile error ?</p>