The Stream programming model, in which WCF understands the Stream type as a special case and accepts any of its (concrete) subclasses, is not available in Silverlight. You can, in Silverlight, use the equivalent type to Stream, byte[], if you want to
share the same .cs file between client and service:
[
ServiceContract]
public
interface
ITest
{
#if !SILVERLIGHT
[OperationContract]
Stream GetStream(string
text);
#else
[OperationContract(AsyncPattern = true)]
IAsyncResult BeginGetStream(string text, AsyncCallback callback, object state);
byte[] EndGetStream(IAsyncResult asyncResult);
#endif
}