我有字节缓冲区:
byte[] buffer = new byte[3];
List<byte[]> list;
现在我要补充:
while ((count = reader.Read(buffer, 0, buffer.Length)) != 0)
{
bool contains = l.Contains<byte[]>(buffer); //This is not working and checking only reference
if (!contains)
{
l.Add(new byte[] buffer[0],buffer[1],buffer[2]});
}
}
如何检查列表是否包含与缓冲区具有相同值的字节数组?