Freigeben über


CodeTypeReferenceExpression-Klasse

Stellt einen Verweis auf einen Datentyp dar.

Namespace: System.CodeDom
Assembly: System (in system.dll)

Syntax

'Declaration
<SerializableAttribute> _
<ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)> _
<ComVisibleAttribute(True)> _
Public Class CodeTypeReferenceExpression
    Inherits CodeExpression
'Usage
Dim instance As CodeTypeReferenceExpression
[SerializableAttribute] 
[ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)] 
[ComVisibleAttribute(true)] 
public class CodeTypeReferenceExpression : CodeExpression
[SerializableAttribute] 
[ClassInterfaceAttribute(ClassInterfaceType::AutoDispatch)] 
[ComVisibleAttribute(true)] 
public ref class CodeTypeReferenceExpression : public CodeExpression
/** @attribute SerializableAttribute() */ 
/** @attribute ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch) */ 
/** @attribute ComVisibleAttribute(true) */ 
public class CodeTypeReferenceExpression extends CodeExpression
SerializableAttribute 
ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch) 
ComVisibleAttribute(true) 
public class CodeTypeReferenceExpression extends CodeExpression

Hinweise

Mit CodeTypeReferenceExpression kann auf einen bestimmten Datentyp verwiesen werden.

Die Type-Eigenschaft gibt den Datentyp an, auf den verwiesen werden soll.

Beispiel

Im folgenden Beispiel wird die Verwendung einer CodeTypeReferenceExpression zum Darstellen eines Verweises auf einen Typ veranschaulicht.

' Creates an expression referencing the System.DateTime type.
Dim typeRef2 As New CodeTypeReferenceExpression("System.DateTime")

' A Visual Basic code generator produces the following source code for the preceeding example code:    

'       System.DateTime
// Creates an expression referencing the System.DateTime type.
CodeTypeReferenceExpression typeRef2 = new CodeTypeReferenceExpression("System.DateTime");

// A C# code generator produces the following source code for the preceeding example code:    

//    System.DateTime
// Creates an expression referencing the System.DateTime type.
CodeTypeReferenceExpression^ typeRef2 = gcnew CodeTypeReferenceExpression( "System.DateTime" );

// A C# code generator produces the following source code for the preceeding example code:
//    System.DateTime
// Creates an expression referencing the System.DateTime type.
CodeTypeReferenceExpression typeRef2 = new 
    CodeTypeReferenceExpression("System.DateTime");
// A VJ# code generator produces the following source code
// for the preceeding example code:    
//    System.DateTime

Vererbungshierarchie

System.Object
   System.CodeDom.CodeObject
     System.CodeDom.CodeExpression
      System.CodeDom.CodeTypeReferenceExpression

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

CodeTypeReferenceExpression-Member
System.CodeDom-Namespace