嵌套使用()和代码规则CA2202

时间:2015-06-17 11:39:15

标签: c# code-analysis

我有以下代码警告代码质量规则CA2202

public void Deserialize(byte[] bytes, Encoding encoding)
    {
        using (var ms = new MemoryStream(bytes))
        using (var reader = new BinaryReader(ms))
        {
            this.ClientRequestId = reader.ReadUInt32();
            this.PayloadSize = reader.ReadUInt32();
            this.Payload = reader.ReadString((int)this.PayloadSize).TrimEnd('\0');
        }
    }

为什么会发生这种情况,我该如何解决? 感谢

0 个答案:

没有答案