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

Represents a simple assignment statement.Represents a simple assignment statement.

CodeAttachEventStatement

Represents a statement that attaches an event-handler delegate to an event.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.Represents an expression that consists of a binary operation between two expressions.

CodeCastExpression

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

CodeCatchClause

Represents a catch exception block of a try/catch statement.Represents a catch exception block of a try/catch statement.

CodeCatchClauseCollection

Represents a collection of CodeCatchClause objects.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

Provides a container for a CodeDOM program graph.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.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

Represents a collection of CodeExpression objects.Represents a collection of CodeExpression objects.

CodeExpressionStatement

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

CodeFieldReferenceExpression

Represents a reference to a field.Represents a reference to a field.

CodeGotoStatement

Represents a goto statement.Represents a goto statement.

CodeIndexerExpression

Represents a reference to an indexer property of an object.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.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.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.Represents a parameter declaration for a method, property, or constructor.

CodeParameterDeclarationExpressionCollection

Represents a collection of CodeParameterDeclarationExpression objects.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.Represents a statement that removes an event handler.

CodeSnippetCompileUnit

Represents a literal code fragment that can be compiled.Represents a literal code fragment that can be compiled.

CodeSnippetExpression

Represents a literal expression.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.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

Represents a collection of CodeTypeReference objects.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.Defines identifiers for supported binary operators.

CodeRegionMode

Specifies the start or end of a code region.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.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.