1
我已经在服务器端创建了csv文件。现在我想通过WCF RIA Services将它发送给我的silverlight客户端 。我创建了以下内容:在服务器端写入csv文件,并通过WCF将其发送到silverlight客户端RIA服务
public byte[] GetMyCSV()
{
string file = @"c:\test.csv";
using (StreamWriter sw = new StreamWriter(file, true, Encoding.GetEncoding(932)))
{
//write csv file content
...
}
???
}
我的服务应该发送字节数组吗?如果那么如何从StreamWriter获取字节数组?