title: Why is WCF serializing a Enum as a string?
body: <p>Code on the server</p>
  
  <pre><code>&lt;DataContract(Namespace:="http://schema.aam.us.com/2010/6", Name:="TradeStatus")&gt;
  Public Enum TradeStatus
  
      NewOrder = 100
      SendToProvider = 101
      ProviderSubmitted = 102
      ProviderAccepted = 103
      ExecutionPending = 104
      Executed = 105
      TicketsCreated = 106 'TERMINAL STATE
  
  End Enum
  
  &lt;DataContract(Namespace:="http://schema.aam.us.com/2010/6", Name:="StatusUpdate")&gt; _
  Public Class StatusUpdate
  
      Public Sub New(ByVal tradeStatus As TradeStatus, ByVal additionalInformation As String)
          Me.TradeStatus = tradeStatus
          Me.AdditionalInforamtion = additionalInformation
      End Sub
  
      &lt;DataMember(IsRequired:=True)&gt; _
      Public Property AdditionalInforamtion() As String
  
      &lt;DataMember(IsRequired:=True)&gt; _
      Public Property TradeStatus() As TradeStatus
  End Class
  </code></pre>
  
  <p>Generated code</p>
  
  <pre><code>&lt;System.Diagnostics.DebuggerStepThroughAttribute(),  _
   System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0"),  _
   System.Runtime.Serialization.DataContractAttribute(Name:="StatusUpdate", [Namespace]:="http://schema.aam.us.com/2010/6"),  _
   System.SerializableAttribute()&gt;  _
  Partial Public Class StatusUpdate
      Inherits Object
      Implements System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged
  
      &lt;System.NonSerializedAttribute()&gt;  _
      Private extensionDataField As System.Runtime.Serialization.ExtensionDataObject
  
      Private AdditionalInforamtionField As String
  
      Private TradeStatusField As String
  
      &lt;Global.System.ComponentModel.BrowsableAttribute(false)&gt;  _
      Public Property ExtensionData() As System.Runtime.Serialization.ExtensionDataObject Implements System.Runtime.Serialization.IExtensibleDataObject.ExtensionData
          Get
              Return Me.extensionDataField
          End Get
          Set
              Me.extensionDataField = value
          End Set
      End Property
  
      &lt;System.Runtime.Serialization.DataMemberAttribute(IsRequired:=true)&gt;  _
      Public Property AdditionalInforamtion() As String
          Get
              Return Me.AdditionalInforamtionField
          End Get
          Set
              If (Object.ReferenceEquals(Me.AdditionalInforamtionField, value) &lt;&gt; true) Then
                  Me.AdditionalInforamtionField = value
                  Me.RaisePropertyChanged("AdditionalInforamtion")
              End If
          End Set
      End Property
  
      &lt;System.Runtime.Serialization.DataMemberAttribute(IsRequired:=true, EmitDefaultValue:=false)&gt;  _
      Public Property TradeStatus() As String
          Get
              Return Me.TradeStatusField
          End Get
          Set
              If (Object.ReferenceEquals(Me.TradeStatusField, value) &lt;&gt; true) Then
                  Me.TradeStatusField = value
                  Me.RaisePropertyChanged("TradeStatus")
              End If
          End Set
      End Property
  
      Public Event PropertyChanged As System.ComponentModel.PropertyChangedEventHandler Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged
  
      Protected Sub RaisePropertyChanged(ByVal propertyName As String)
          Dim propertyChanged As System.ComponentModel.PropertyChangedEventHandler = Me.PropertyChangedEvent
          If (Not (propertyChanged) Is Nothing) Then
              propertyChanged(Me, New System.ComponentModel.PropertyChangedEventArgs(propertyName))
          End If
      End Sub
  End Class
  </code></pre>