Compilerfehler CS0596
Aktualisiert: November 2007
Fehlermeldung
Das Guid-Attribut muss mit dem ComImport-Attribut angegeben werden.
The Guid attribute must be specified with the ComImport attribute
Das Guid-Attribut muss bei Verwendung des ComImport-Attributs verfügbar sein.
Im folgenden Beispiel wird CS0596 generiert:
// CS0596.cs
using System.Runtime.InteropServices;
namespace x
{
[ComImport] // CS0596
// try the following line to resolve this CS0596
// [ComImport, Guid("00000000-0000-0000-0000-000000000001")]
public class a
{
}
public class b
{
public static void Main()
{
}
}
}