Service Factory Issue

Damir Dobric Posts

Next talks:



Follow me on Twitter: #ddobric




When you create a Data Contract with number of primitive properties, be sure that the name of the property is never "Value". Following example shows a Data Contract which you should not use:


In this case the Data Contract generator would create following code, which is invalid, but it can be compiled:

[WcfSerialization::DataContract(Namespace = "",
Name = "Token")]
public partial class Token
      private System.Guid tokenValue;

      [WcfSerialization::DataMember(Name = "TokenValue",
        IsRequired = false, Order = 0)]
       public System.Guid TokenValue
          get { return tokenValue; }
set { value = value; }

Posted Jan 29 2008, 02:49 PM by Damir Dobric is a .Net Community Blog powered by daenet GmbH.