title: Is it possible to trigger conditional compiler warnings similar to "Obsolete", but with different meanings?
body: <p>I have a function which should only be used by a developer in special circumstances. </p>
  
  <p>Unfortunately setting public / private doesn't really help, as it needs to be visible for use in many cases.</p>
  
  <p>I have documented the function with xmldocs to give the developer a warning, but is it possible to output a compiler warning? Perhaps using an attribute, similar to marking a function as obsolete?</p>
  
  <p>Or perhaps if someone has any useful architectural advice on steering people away from dangerous methods (i'm guessing this will probably be separate namespaces, inheritance etc?)</p>
  
  <hr>
  
  <p>ADDITIONAL DETAIL</p>
  
  <p>Thanks for the answers guys, lots of 1+'s from me :-)</p>
  
  <p>It's also helped me clarify my question:</p>
  
  <p>[Obsolete("my message")] is better in some ways to #warning, as it will only display a warning if the method is actually being used. However as ChrisF points out, it isn't actually an Obsolete method, so isn't really accurate.</p>
  
  <p>Is there a middle ground between the functionality of [Obsolete("my message")] but without the meaning?</p>