, , . , GetHashCode, , , ...
, , - , , :
class ArrayWrapper<T>
{
private T[] _array;
public ArrayWrapper(T[] array)
{
_array = array;
}
private int? _hashcode;
public override int GetHashCode()
{
if (!_hashcode.HasValue)
{
_hashcode = ComputeHashCode();
}
return _hashcode.Value;
}
public override bool Equals(object other)
{
}
protected virtual int ComputeHashCode()
{
}
public int Length
{
get { return _array.Length; }
}
public T this[int index]
{
get { return _array[index]; }
set
{
_array[index] = value;
_hashcode = null;
}
}
}
, Dictionary<ArrayWrapper<double>, ArrayWrapper<double>>. , (, IList<T>)