1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-17 23:56:05 +02:00

Add copy constructor to Dictionary class

This commit is contained in:
disarray2077 2022-01-01 21:53:17 -03:00 committed by GitHub
parent 9ce0cc217a
commit cd065bd8bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -48,7 +48,13 @@ namespace System.Collections
//if (capacity < 0) ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.capacity); //if (capacity < 0) ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.capacity);
if (capacity > 0) Initialize(capacity); if (capacity > 0) Initialize(capacity);
//TODO: this.comparer = comparer ?? EqualityComparer<TKey>.Default; //TODO: this.comparer = comparer ?? EqualityComparer<TKey>.Default;
} }
public this(IEnumerator<KeyValuePair> enumerator)
{
for (var kv in enumerator)
this[kv.key] = kv.value;
}
public ~this() public ~this()
{ {