Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WCF return types

Tags:

.net

wcf

What is the list of valid WCF return types? I know some but I want to know all of them:

  • Primitive types (string, int32, etc...)
  • Complex types with DataContract or Serializable attributes
  • Stream
  • Message
  • SyndicationFeedFormatter

void? POCOs?

like image 826
Max Toro Avatar asked Nov 06 '22 09:11

Max Toro


1 Answers

Basically everything that the serializer used in the binding could handle. Also note that since .NET 3.5 SP1 DataContract and DataMemeber are no longer necessary, WCF will serialize all public properties, but it is a good practice to put them.

like image 185
Darin Dimitrov Avatar answered Nov 12 '22 20:11

Darin Dimitrov