相关疑难解决方法(0)

WCF绑定使用的序列化的性能测试

我有以下对象:

public partial class Game
{
    public bool Finished { get; set; }

    public Guid GameGUID { get; set; }

    public long GameID { get; set; }

    public bool GameSetup { get; set; }

    public Nullable<int> MaximumCardsInDeck { get; set; }

    public Player Player { get; set; }

    public Player Player1 { get; set; }

    public bool Player1Connected { get; set; }

    public bool Player1EnvironmentSetup { get; set; }

    public long Player1ID { get; set; }

    public int Player1Won { …
Run Code Online (Sandbox Code Playgroud)

.net c# performance wcf wcf-binding

12
推荐指数
3
解决办法
1万
查看次数

如何在Windows Phone 7中使用BinaryFormatter

如何在Windows Phone 7中使用BinaryFormatter.

using System.Runtime.Serialization.Formatters.Binary在service1.svc.cs中使用它,但我不能在windows phone 7中使用此Reference.

这有什么解决方案吗?

我的DeserializeObject代码

 public static T DeserializeObject<T>(byte[] xml)
    {
        BinaryFormatter xs = new BinaryFormatter();
        MemoryStream memoryStream = new MemoryStream(xml);
        return (T)xs.Deserialize(memoryStream);
    } 
Run Code Online (Sandbox Code Playgroud)

BinaryFormatter在Windows Phone 7中出错.那么我该怎样才能反序列化.我在这段代码中要做些什么改变?

wcf visual-studio-2010 windows-phone-7.1

5
推荐指数
2
解决办法
3371
查看次数