title: How do I prevent web service from auto generating properties from fields in reference.cs
body: <p>I've got an issue where some code in an old win forms app that is using reflection on an object from a web service to get a list of fields.  The reflection is calling GetFields().  In my data object in the web service I have fields defined as such:</p>
  
  <pre><code>public string PropertyAddress1;
  public string PropertyAddress2;
  public string PropertyCity;
  public string PropertyCounty;
  public string PropertyState;
  </code></pre>
  
  <p>In the current version of reference.cs that exists in the win forms app the fields look like so.</p>
  
  <pre><code>public string PropertyAddress1;
  public string PropertyAddress2;
  public string PropertyCity;
  public string PropertyCounty;
  public string PropertyState;
  </code></pre>
  
  <p>The same right?</p>
  
  <p>Well, I went in to the web service's class and added another field. I then went into the win forms app, right clicked and hit update web reference.  When the code is regenerated the reference.cs looks like this:</p>
  
  <pre><code>private string propertyAddress1Field;
  private string propertyAddress2Field;
  private string propertyCityField;
  private string propertyCountyField;
  private string propertyStateField;
  
     public string PropertyAddress1 {
          get {
              return this.propertyAddress1Field;
          }
          set {
              this.propertyAddress1Field = value;
          }
      }
  
      /// &lt;remarks/&gt;
      public string PropertyAddress2 {
          get {
              return this.propertyAddress2Field;
          }
          set {
              this.propertyAddress2Field = value;
          }
      }
  
      /// &lt;remarks/&gt;
      public string PropertyCity {
          get {
              return this.propertyCityField;
          }
          set {
              this.propertyCityField = value;
          }
      }
  
      /// &lt;remarks/&gt;
      public string PropertyCounty {
          get {
              return this.propertyCountyField;
          }
          set {
              this.propertyCountyField = value;
          }
      }
  
      /// &lt;remarks/&gt;
      public string PropertyState {
          get {
              return this.propertyStateField;
          }
          set {
              this.propertyStateField = value;
          }
      }
  </code></pre>
  
  <p>This is throwing off the behavior of existing code because GetFields() is no longer returning anything.  I know I could swap it to GetProperties() but the class already has properties defined that I do not want returned back in the result set. I would like the reference .cs to generate fields as fields and properties as properties instead of converting fields to properties.  Is there any way I can put some data annotations or some other sort of flag that prevents this behavior in the auto generated reference.cs for fields?</p>