title: Notify Developer of a "DO NOT USE" Method
body: <p>OK, I know what you're thinking, &quot;why write a method you do not want people to use?&quot; Right?</p>
  <p>Well, in short, I have a class that needs to be serialized to XML. In order for the <a href="https://msdn.microsoft.com/en-us/library/system.xml.serialization.xmlserializer%28v=vs.110%29.aspx" rel="noreferrer"><code>XmlSerializer</code></a> to do its magic, the class must have a default, empty constructor:</p>
  <pre><code>public class MyClass
  {
    public MyClass()
    {
      // required for xml serialization
    }
  }
  </code></pre>
  <p>So, I need to have it, but I don't want people to <em>use</em> it, so <strong>is there any attribute that can be use to mark the method as &quot;DO NOT USE&quot;?</strong></p>
  <p>I was thinking of using the <em>Obsolete</em> attribute (since this can stop the build), but that just seems kinda &quot;wrong&quot;, is there any other way of doing this, or do I need to go ahead and bite the bullet? :)</p>
  <h2>Update</h2>
  <p>OK, I have accepted Keith's answer, since I guess in my heart of hearts, I totally agree. This is why I asked the question in the first place, I don't like the notion of having the <em>Obsolete</em> attribute.</p>
  <h3>However...</h3>
  <p>There <em>is</em> still a problem, while we are being notified in intellisense, ideally, we would like to break the build, so is there any way to do this? Perhaps create a custom attribute?</p>
  <p><strong>More focused question has been created <a href="https://stackoverflow.com/questions/28150/create-an-attribute-to-break-the-build">here</a>.</strong></p>