tags:

views:

359

answers:

2
    [DataMember]
    public int? NumberOfPages;   //////////// Is this supported????
    [DataMember]
    public bool? Color;          //////////// Is this supported????
    [DataMember]
    public int? BulkQuantity;
    [DataMember]
+3  A: 

Yes, of course!

You should have no trouble whatsoever to create nullable data members, they'll be handled in the resulting WSDL/XSD as "xs:nillable=true" members. No problem at all.

marc_s
But when i am doing that and testing it using WCF Test client , it says that "This operation is not supported by WCF Test client".
Pinu
maybe it's just the WCF test client that can't handle it! Try writing your own little client to call a single function and get back that information.
marc_s
marc_s is right; the web page lets you test a service from within a browser only supports primitive data types as parameters. This does not harm the service's functionality. If you don't want to write your own tool, try MS WCF Test Client (http://msdn.microsoft.com/en-us/library/bb552364.aspx)
GreenIcicle
A: 

Yes, please see Types Supported by the Data Contract Serializer:

Nullable types are fully supported by the data contract serializer.

Andrew Hare