<p>The code looks like below:</p>

<pre><code>namespace Test
{
    public interface IMyClass
    {
        List&lt;IMyClass&gt; GetList();
    }

    public class MyClass : IMyClass
    {
        public List&lt;IMyClass&gt; GetList()
        {
            return new List&lt;IMyClass&gt;();
        }
    }
}
</code></pre>

<p>When I Run Code Analysis i get the following recommendation.</p>

<blockquote>
  <p>Warning    3   CA1002 : Microsoft.Design : Change 'List' in 'IMyClass.GetList()' to use Collection, ReadOnlyCollection or KeyedCollection</p>
</blockquote>

<p>How should I fix this and what is good practice here?</p>

I would personally declare it to return an interface rather than a concrete collection. If you really want list access, use
```
IList<T>
```
. Otherwise, consider
```
ICollection<T>
```
and
```
IEnumerable<T>
```
.