Possible Duplicate:
WCF DataMember EmitDefaultValue on value type? (but set my own default value)
Consider the following:
[DataContract]
public class MyType {
[DataMember(EmitDefaultValue = true)]
public string MyStr = "DefVal";
}
In the code above, I can specify the default value to use after assignment.
Now consider the following:
[DataContract]
public class MyType {
[DataMember(EmitDefaultValue = true)]
public string MyStr {
get { ... }
set { ... }
}
}
How can I specify the default value here???
Thankyou