/// <summary>
/// 字节数组转对象
/// </summary>
/// <param name="buff"></param>
/// <returns></returns>
public static object Bytes2Object(byte[] buff)
{
object obj;
using (MemoryStream ms = new MemoryStream(buff))
{
IFormatter iFormatter = new BinaryFormatter();
obj = iFormatter.Deserialize(ms);
}
return obj;
}