我有以下代码警告代码质量规则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');
}
}
为什么会发生这种情况,我该如何解决? 感谢