title: Hide public Property when exposed through web service
body: <p>I would like to prevent a property from being exposed via my WCF web service. I tried adding the XmlIgnore attribute bug that didn't work. We are using .NET 3.5. WCF. </p>
  
  <p>This doesn't work:</p>
  
  <pre><code>    public class MyClass
      {
          public string S1 { get; set; }
  
          [XmlIgnore]
          public string S2NotExposed { get; set; }
      }
  </code></pre>