Poznámka
Přístup k této stránce vyžaduje autorizaci. Můžete se zkusit přihlásit nebo změnit adresáře.
Přístup k této stránce vyžaduje autorizaci. Můžete zkusit změnit adresáře.
Aktualisiert: November 2007
Fehlermeldung
Die "Schnittstelle"-Schnittstelle wurde mit CoClassAttribute und nicht mit ComImportAttribute markiert.
'interface' interface marked with 'CoClassAttribute' not marked with 'ComImportAttribute'
Wenn Sie CoClassAttribute für eine Schnittstelle festlegen, muss zusätzlich ComImportAttribute angegeben werden.
Im folgenden Beispiel wird CS0684 generiert:
// CS0684.cs
// compile with: /W:1
using System;
using System.Runtime.InteropServices;
[CoClass(typeof(C))] // CS0684
// try the following line instead
// [CoClass(typeof(C)), ComImport]
interface I
{
}
class C
{
static void Main() {}
}