c#: Fixing ca2208 for Eina.List.

Some ca's warning reactivated.
ref T8428

Reviewed-by: João Paulo Taylor Ienczak Zanette <joao.tiz@expertisesolutions.com.br>
Differential Revision: https://phab.enlightenment.org/D10911
This commit is contained in:
Bruno da Silva Belo 2019-12-18 20:42:08 +00:00 committed by Felipe Magno de Almeida
parent 5827fdb3cb
commit b90c50ad17
1 changed files with 2 additions and 2 deletions

View File

@ -188,13 +188,13 @@ public class List<T> : IList<T>, IEnumerable<T>, IDisposable
{
if (!(0 <= idx && idx < Count))
{
throw new ArgumentOutOfRangeException();
throw new ArgumentOutOfRangeException(nameof(idx), $"{nameof(idx)} cannot be negative, neither smaller than {nameof(Count)}");
}
var ele = f(Handle, (uint)idx);
if (ele == IntPtr.Zero)
{
throw new ArgumentOutOfRangeException();
throw new ArgumentOutOfRangeException(nameof(idx), $"There is no position {nameof(idx)}");
}
return ele;