System.CodeDom 命名空間

System.CodeDom 命名空間 (Namespace) 包含可以用來表示原始程式碼文件之項目和結構的類別。 The System.CodeDom namespace contains classes that can be used to represent the elements and structure of a source code document. 命名空間中的類別可以用來塑造原始程式碼文件結構的模型,該結構可以使用 System.CodeDom.Compiler 命名空間提供的功能,以支援的語言輸出為原始程式碼。 The classes in this namespace can be used to model the structure of a source code document that can be output as source code in a supported language using the functionality provided by the System.CodeDom.Compiler namespace.

類別

CodeArgumentReferenceExpression

代表傳遞至方法之引數值的參考。Represents a reference to the value of an argument passed to a method.

CodeArrayCreateExpression

表示建立陣列的運算式。Represents an expression that creates an array.

CodeArrayIndexerExpression

表示陣列索引的參考。Represents a reference to an index of an array.

CodeAssignStatement

表示簡單的指派陳述式 (Assignment Statement)。Represents a simple assignment statement.

CodeAttachEventStatement

表示將事件處理常式委派附加至事件的陳述式。Represents a statement that attaches an event-handler delegate to an event.

CodeAttributeArgument

表示用於中繼資料 (Metadata) 屬性宣告的引數。Represents an argument used in a metadata attribute declaration.

CodeAttributeArgumentCollection

表示 CodeAttributeArgument 物件的集合。Represents a collection of CodeAttributeArgument objects.

CodeAttributeDeclaration

表示屬性宣告。Represents an attribute declaration.

CodeAttributeDeclarationCollection

表示 CodeAttributeDeclaration 物件的集合。Represents a collection of CodeAttributeDeclaration objects.

CodeBaseReferenceExpression

表示基底類別的參考。Represents a reference to the base class.

CodeBinaryOperatorExpression

代表在兩個運算式間的二元運算所組成的運算式。Represents an expression that consists of a binary operation between two expressions.

CodeCastExpression

表示一個轉換為資料型別或介面的運算式。Represents an expression cast to a data type or interface.

CodeCatchClause

表示 catch 陳述式中的 try/catch 例外狀況區塊。Represents a catch exception block of a try/catch statement.

CodeCatchClauseCollection

表示 CodeCatchClause 物件的集合。Represents a collection of CodeCatchClause objects.

CodeChecksumPragma

表示程式碼總和檢查碼 Pragma 程式碼實體。Represents a code checksum pragma code entity.

CodeComment

表示註解。Represents a comment.

CodeCommentStatement

表示包含單一註解的陳述式 (Statement)。Represents a statement consisting of a single comment.

CodeCommentStatementCollection

表示 CodeCommentStatement 物件的集合。Represents a collection of CodeCommentStatement objects.

CodeCompileUnit

提供一個 CodeDOM 程式圖形的容器。Provides a container for a CodeDOM program graph.

CodeConditionStatement

表示條件分支陳述式 (Statement),通常表示為 if 陳述式。Represents a conditional branch statement, typically represented as an if statement.

CodeConstructor

代表型別之執行個體建構函式的宣告。Represents a declaration for an instance constructor of a type.

CodeDefaultValueExpression

表示參考預設值。Represents a reference to a default value.

CodeDelegateCreateExpression

表示建立委派的運算式。Represents an expression that creates a delegate.

CodeDelegateInvokeExpression

表示引發事件的運算式。Represents an expression that raises an event.

CodeDirectionExpression

代表做為叫用參數與參考方向指示器之方法的運算式。Represents an expression used as a method invoke parameter along with a reference direction indicator.

CodeDirective

做為程式碼指示詞類別的基底類別。Serves as the base class for code directive classes.

CodeDirectiveCollection

表示 CodeDirective 物件的集合。Represents a collection of CodeDirective objects.

CodeEntryPointMethod

代表可執行檔的進入點方法。Represents the entry point method of an executable.

CodeEventReferenceExpression

代表事件的參考。Represents a reference to an event.

CodeExpression

表示程式碼運算式。Represents a code expression. 這是永不執行個體化之其他程式碼運算式物件的基底類別。This is a base class for other code expression objects that is never instantiated.

CodeExpressionCollection

表示 CodeExpression 物件的集合。Represents a collection of CodeExpression objects.

CodeExpressionStatement

表示包含單一運算式的陳述式 (Statement)。Represents a statement that consists of a single expression.

CodeFieldReferenceExpression

表示欄位的參考。Represents a reference to a field.

CodeGotoStatement

表示 goto 陳述式。Represents a goto statement.

CodeIndexerExpression

表示物件的索引子 (Indexer) 屬性的參考。Represents a reference to an indexer property of an object.

CodeIterationStatement

表示 for 陳述式或陳述式區塊的迴圈,使用測試運算式做為繼續迴圈的條件。Represents a for statement, or a loop through a block of statements, using a test expression as a condition for continuing to loop.

CodeLabeledStatement

表示標記陳述式 (Label Statement) 或是獨立標記。Represents a labeled statement or a stand-alone label.

CodeLinePragma

表示特定檔案內的特定位置。Represents a specific location within a specific file.

CodeMemberEvent

表示型別事件的宣告。Represents a declaration for an event of a type.

CodeMemberField

表示型別欄位的宣告。Represents a declaration for a field of a type.

CodeMemberMethod

表示型別方法的宣告。Represents a declaration for a method of a type.

CodeMemberProperty

表示型別屬性的宣告。Represents a declaration for a property of a type.

CodeMethodInvokeExpression

表示叫用 (Invoke) 方法的運算式。Represents an expression that invokes a method.

CodeMethodReferenceExpression

表示方法的參考。Represents a reference to a method.

CodeMethodReturnStatement

表示傳回值陳述式。Represents a return value statement.

CodeNamespace

表示命名空間 (Namespace) 宣告。Represents a namespace declaration.

CodeNamespaceCollection

表示 CodeNamespace 物件的集合。Represents a collection of CodeNamespace objects.

CodeNamespaceImport

表示命名空間匯入指示詞,其指示所要使用的命名空間。Represents a namespace import directive that indicates a namespace to use.

CodeNamespaceImportCollection

表示 CodeNamespaceImport 物件的集合。Represents a collection of CodeNamespaceImport objects.

CodeObject

提供通用的基底類別 (Base Class) 給大部分的程式碼文件物件模型 (CodeDOM) 物件。Provides a common base class for most Code Document Object Model (CodeDOM) objects.

CodeObjectCreateExpression

表示建立型別之新執行個體的運算式。Represents an expression that creates a new instance of a type.

CodeParameterDeclarationExpression

表示方法、屬性或建構函式的參數宣告。Represents a parameter declaration for a method, property, or constructor.

CodeParameterDeclarationExpressionCollection

表示 CodeParameterDeclarationExpression 物件的集合。Represents a collection of CodeParameterDeclarationExpression objects.

CodePrimitiveExpression

表示基本資料型別值。Represents a primitive data type value.

CodePropertyReferenceExpression

表示屬性值的參考。Represents a reference to the value of a property.

CodePropertySetValueReferenceExpression

表示屬性集方法內之屬性集方法呼叫的數值引數。Represents the value argument of a property set method call within a property set method.

CodeRegionDirective

指定程式碼區域的名稱和模式。Specifies the name and mode for a code region.

CodeRemoveEventStatement

表示移除事件處理常式的陳述式。Represents a statement that removes an event handler.

CodeSnippetCompileUnit

表示可以加以編譯的常值 (Literal) 程式碼片段。Represents a literal code fragment that can be compiled.

CodeSnippetExpression

表示常值 (Literal) 運算式。Represents a literal expression.

CodeSnippetStatement

表示使用常值 (Literal) 程式碼片段的陳述式。Represents a statement using a literal code fragment.

CodeSnippetTypeMember

表示一個使用常值程式碼片段的型別成員。Represents a member of a type using a literal code fragment.

CodeStatement

表示可衍生出所有程式碼陳述式 (Statement) 的 abstract 基底類別。Represents the abstract base class from which all code statements derive.

CodeStatementCollection

表示 CodeStatement 物件的集合。Represents a collection of CodeStatement objects.

CodeThisReferenceExpression

表示目前的區域類別 (Local Class) 執行個體的參考。Represents a reference to the current local class instance.

CodeThrowExceptionStatement

表示擲回例外狀況的陳述式。Represents a statement that throws an exception.

CodeTryCatchFinallyStatement

表示 try 區塊和任意數目的 catch 子句,亦可選擇 finally 區塊。Represents a try block with any number of catch clauses and, optionally, a finally block.

CodeTypeConstructor

表示類別的靜態建構函式。Represents a static constructor for a class.

CodeTypeDeclaration

表示類別、結構、介面或列舉型別的型別宣告。Represents a type declaration for a class, structure, interface, or enumeration.

CodeTypeDeclarationCollection

表示 CodeTypeDeclaration 物件的集合。Represents a collection of CodeTypeDeclaration objects.

CodeTypeDelegate

表示委派 (Delegate) 宣告。Represents a delegate declaration.

CodeTypeMember

提供型別成員的基底類別。Provides a base class for a member of a type. 型別成員包含欄位、方法、屬性、建構函式 (Constructor) 和巢狀型別。Type members include fields, methods, properties, constructors and nested types.

CodeTypeMemberCollection

表示 CodeTypeMember 物件的集合。Represents a collection of CodeTypeMember objects.

CodeTypeOfExpression

表示 typeof 運算式,它會傳回指定型別名稱的 TypeRepresents a typeof expression, an expression that returns a Type for a specified type name.

CodeTypeParameter

表示泛型型別或方法的型別參數。Represents a type parameter of a generic type or method.

CodeTypeParameterCollection

表示 CodeTypeParameter 物件的集合。Represents a collection of CodeTypeParameter objects.

CodeTypeReference

表示型別的參考。Represents a reference to a type.

CodeTypeReferenceCollection

表示 CodeTypeReference 物件的集合。Represents a collection of CodeTypeReference objects.

CodeTypeReferenceExpression

表示資料型別的參考。Represents a reference to a data type.

CodeVariableDeclarationStatement

表示變數宣告。Represents a variable declaration.

CodeVariableReferenceExpression

表示區域變數的參考。Represents a reference to a local variable.

列舉

CodeBinaryOperatorType

定義支援二元運算子的識別項。Defines identifiers for supported binary operators.

CodeRegionMode

指定程式碼區域的開頭或結尾。Specifies the start or end of a code region.

CodeTypeReferenceOptions

指定如何解析程式碼型別參考。Specifies how the code type reference is to be resolved.

FieldDirection

定義用於指示參數方向和引數宣告的識別項。Defines identifiers used to indicate the direction of parameter and argument declarations.

MemberAttributes

定義類別成員的成員屬性識別項。Defines member attribute identifiers for class members.

備註

如需使用 CodeDOM 表示,並產生原始碼的詳細資訊,請參閱動態原始程式碼的產生和編譯For more information about using the CodeDOM to represent and generate source code, see Dynamic Source Code Generation and Compilation.

資料表會列出由型別和函式的 CodeDOM 項目,請參閱CodeDOM 快速參考For a table that lists the CodeDOM elements by type and function, see the CodeDOM Quick Reference.