I have a contract as follows:
[DataContract]
public class MyObj
{
[DataMember(IsRequired=true)]
public string StrA {get; private set;}
[DataMember(IsRequired=false)]
public string StrB {get; private set;}
}
What exactly does IsRequired
mean? Does IsRequired=false
mean that I can pass an instance of MyObj
across the wire with StrB
unitialized or does it mean that I can pass an instance of MyObj
across the wire with StrB
absent?
If the latter, how do I actually instantiate + send across an instance of MyObj
without StrB
?