Error del compilador CS1910

Actualización: noviembre 2007

Mensaje de error

El argumento de tipo 'tipo' no se puede aplicar al atributo DefaultValue
Argument of type 'type' is not applicable for the DefaultValue attribute

Para los parámetros cuyo tipo sea un objeto, el valor del argumento de DefaultParameterValueAttribute debe ser null, un tipo integral, un punto flotante, bool, string, enum o char. El argumento no puede ser de tipo Type o cualquier tipo de matriz.

Ejemplo

El código siguiente genera el error CS1910.

// CS1910.cs
// compile with: /target:library
using System.Runtime.InteropServices;

public interface MyI
{
   void Test([DefaultParameterValue(typeof(object))] object o);   // CS1910
}