Windows Phone访问web service和WCF服务
2012-05-18 08:01:14 来源:WEB开发网核心提示:Service的类中写如下方法: [WebMethod] public byte[] GetCity() { System.IO.MemoryStream m = new System.IO.MemoryStream(); System.Drawing.Bitmap bp = new System.Dr
Service的类中写如下方法:
- [WebMethod]
- public byte[] GetCity()
- {
- System.IO.MemoryStream m = new System.IO.MemoryStream();
- System.Drawing.Bitmap bp = new System.Drawing.Bitmap(Server.MapPath("~")+@"/a.jpg");
- bp.Save(m, System.Drawing.Imaging.ImageFormat.Jpeg);
- return m.GetBuffer();
- }
更多精彩
赞助商链接