Compilador CS0662 de erro

Mensagem de erro

não é possível especificar 'método' somente saída atributo em um parâmetro ref.Use tanto in e out atributos ou não.

Um método de interface possui um parâmetro que utilize ref com apenas o Check-out atributo.A ref parâmetro que usa o Check-out atributo também deve usar o Em atributo.

O exemplo a seguir gera CS0662:

// CS0662.cs
using System.Runtime.InteropServices;

interface I
{
   void method([Out] ref int i);   // CS0662
   // try one of the following lines instead
   // void method(ref int i);
   // void method([Out, In]ref int i);
}

class test
{
   public static void Main()
   {
   }
}