ThrowHelper
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
namespace System.Collections
{
internal static class ThrowHelper
{
[DoesNotReturn]
internal static void ThrowKeyNotFound<TKey>(TKey key)
{
throw new KeyNotFoundException(System.SR.Format(System.SR.Arg_KeyNotFoundWithKey, key));
}
[DoesNotReturn]
internal static void ThrowDuplicateKey<TKey>(TKey key)
{
throw new ArgumentException(System.SR.Format(System.SR.Argument_AddingDuplicate, key), "key");
}
[DoesNotReturn]
internal static void ThrowConcurrentOperation()
{
throw new InvalidOperationException(System.SR.InvalidOperation_ConcurrentOperationsNotSupported);
}
[DoesNotReturn]
internal static void ThrowIndexArgumentOutOfRange()
{
throw new ArgumentOutOfRangeException("index");
}
[DoesNotReturn]
internal static void ThrowVersionCheckFailed()
{
throw new InvalidOperationException(System.SR.InvalidOperation_EnumFailedVersion);
}
}
}