public void Set(T v) { int index = mData.IndexOf(v); if (index != -1) { //找到元素 mData.Delete(index, out _); mData.Append(v); } else { //添加数据 if (mData.IsFull()) { mData.Delete(0, out _); } mData.Append(v); } }
public void Set(T v) { int index = mData.IndexOf(v); if (index != -1) { //找到元素 mData.Delete(index, out _); mData.Append(v); } else { //添加数据 if (mData.IsFull()) { mData.Delete(0, out _); } mData.Append(v); } }