Compartir a través de


Error del compilador CS1724

Actualización: noviembre 2007

Mensaje de error

El valor especificado para el argumento 'System.Runtime.InteropServices.DefaultCharSetAttribute' no es válido
Value specified for the argument to 'System.Runtime.InteropServices.DefaultCharSetAttribute' is not valid

Un argumento no válido de DefaultCharSetAttribute genera este error.

Ejemplo

El código siguiente genera el error CS1724.

// CS1724.cs
using System.Runtime.InteropServices;
// To resolve, replace 42 with a valid CharSet value.
 [module:DefaultCharSetAttribute((CharSet)42)]   // CS1724
class C { 

[DllImport("F.Dll")]
extern static void FW1Named();

static void Main() {}
}