Freigeben über


IDispatchConstantAttribute-Klasse

Gibt an, dass der Standardwert für das attributierte Feld oder den attributierten Parameter eine Instanz von DispatchWrapper ist, wobei WrappedObject den Wert NULL (Nothing in Visual Basic) hat.

Namespace: System.Runtime.CompilerServices
Assembly: mscorlib (in mscorlib.dll)

Syntax

'Declaration
<SerializableAttribute> _
<AttributeUsageAttribute(AttributeTargets.Field Or AttributeTargets.Parameter, Inherited:=False)> _
<ComVisibleAttribute(True)> _
Public NotInheritable Class IDispatchConstantAttribute
    Inherits CustomConstantAttribute
'Usage
Dim instance As IDispatchConstantAttribute
[SerializableAttribute] 
[AttributeUsageAttribute(AttributeTargets.Field|AttributeTargets.Parameter, Inherited=false)] 
[ComVisibleAttribute(true)] 
public sealed class IDispatchConstantAttribute : CustomConstantAttribute
[SerializableAttribute] 
[AttributeUsageAttribute(AttributeTargets::Field|AttributeTargets::Parameter, Inherited=false)] 
[ComVisibleAttribute(true)] 
public ref class IDispatchConstantAttribute sealed : public CustomConstantAttribute
/** @attribute SerializableAttribute() */ 
/** @attribute AttributeUsageAttribute(AttributeTargets.Field|AttributeTargets.Parameter, Inherited=false) */ 
/** @attribute ComVisibleAttribute(true) */ 
public final class IDispatchConstantAttribute extends CustomConstantAttribute
SerializableAttribute 
AttributeUsageAttribute(AttributeTargets.Field|AttributeTargets.Parameter, Inherited=false) 
ComVisibleAttribute(true) 
public final class IDispatchConstantAttribute extends CustomConstantAttribute

Hinweise

Dieses Attribut kann auf Felder oder Parameter angewendet werden.

Das Typbibliothek-Importierprogramm verwendet dieses Attribut, um den Standardwert vom Typ VT_DISPATCH vom Wert NULL (Nothing in Visual Basic) zu unterscheiden.

Weitere Informationen über konstante Attribute finden Sie unter der CustomConstantAttribute-Klasse.

Die Klassen in System.Runtime.CompilerServices dürfen nur von Compilerautoren verwendet werden.

Vererbungshierarchie

System.Object
   System.Attribute
     System.Runtime.CompilerServices.CustomConstantAttribute
      System.Runtime.CompilerServices.IDispatchConstantAttribute

Threadsicherheit

Alle öffentlichen statischen (Shared in Visual Basic) Member dieses Typs sind threadsicher. Bei Instanzmembern ist die Threadsicherheit nicht gewährleistet.

Plattformen

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.

Versionsinformationen

.NET Framework

Unterstützt in: 2.0, 1.1, 1.0

Siehe auch

Referenz

IDispatchConstantAttribute-Member
System.Runtime.CompilerServices-Namespace