Repository navigation
Expand file tree
/
Copy pathCodeTypeDeclaration.xml
More file actions
486 lines (447 loc) · 30.2 KB
/
Copy pathCodeTypeDeclaration.xml
File metadata and controls
486 lines (447 loc) · 30.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
<Type Name="CodeTypeDeclaration" FullName="System.CodeDom.CodeTypeDeclaration">
<TypeSignature Language="C#" Value="public class CodeTypeDeclaration : System.CodeDom.CodeTypeMember" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi serializable beforefieldinit CodeTypeDeclaration extends System.CodeDom.CodeTypeMember" />
<TypeSignature Language="DocId" Value="T:System.CodeDom.CodeTypeDeclaration" />
<TypeSignature Language="VB.NET" Value="Public Class CodeTypeDeclaration
Inherits CodeTypeMember" />
<TypeSignature Language="C++ CLI" Value="public ref class CodeTypeDeclaration : System::CodeDom::CodeTypeMember" />
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.CodeDom</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.CodeDom.CodeTypeMember</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute>
<AttributeName>System.Runtime.InteropServices.ClassInterface</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Runtime.InteropServices.ComVisible(true)</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Represents a type declaration for a class, structure, interface, or enumeration.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
<xref:System.CodeDom.CodeTypeDeclaration> can be used to represent code that declares a class, structure, interface, or enumeration. <xref:System.CodeDom.CodeTypeDeclaration> can be used to declare a type that is nested within another type.
The <xref:System.CodeDom.CodeTypeDeclaration.BaseTypes%2A> property specifies the base type or base types of the type being declared. The <xref:System.CodeDom.CodeTypeDeclaration.Members%2A> property contains the type members, which can include methods, fields, properties, comments and other types. The <xref:System.CodeDom.CodeTypeDeclaration.TypeAttributes%2A> property indicates the <xref:System.Reflection.TypeAttributes> values for the type declaration, which indicate the type category of the type. The <xref:System.CodeDom.CodeTypeDeclaration.IsClass%2A>, <xref:System.CodeDom.CodeTypeDeclaration.IsStruct%2A>, <xref:System.CodeDom.CodeTypeDeclaration.IsEnum%2A>, and <xref:System.CodeDom.CodeTypeDeclaration.IsInterface%2A> methods indicate whether the type is a class, structure, enumeration, or interface type, respectively.
> [!NOTE]
> Some programming languages only support the declaration of reference types, or classes. To check a language-specific CodeDOM code generator for support for declaring interfaces, enumerations, or value types, call the <xref:System.CodeDom.Compiler.ICodeGenerator.Supports%2A> method to test for the appropriate <xref:System.CodeDom.Compiler.GeneratorSupport> flags. <xref:System.CodeDom.Compiler.GeneratorSupport.DeclareInterfaces> indicates support for interfaces, <xref:System.CodeDom.Compiler.GeneratorSupport.DeclareEnums> indicates support for enumerations, and <xref:System.CodeDom.Compiler.GeneratorSupport.DeclareValueTypes> indicates support for value types such as structures.
You can build a class or a structure implementation in one complete declaration, or spread the implementation across multiple declarations. The <xref:System.CodeDom.CodeTypeDeclaration.IsPartial%2A> property indicates whether the type declaration is complete or partial. Not all code generators support partial type declarations, so you should test for this support by calling the <xref:System.CodeDom.Compiler.ICodeGenerator.Supports%2A> method with the flag <xref:System.CodeDom.Compiler.GeneratorSupport.PartialTypes>.
## Examples
This example demonstrates using a <xref:System.CodeDom.CodeTypeDeclaration> to declare a type.
[!code-cpp[CodeTypeDeclarationExample#2](~/samples/snippets/cpp/VS_Snippets_CLR/CodeTypeDeclarationExample/CPP/codetypedeclarationexample.cpp#2)]
[!code-csharp[CodeTypeDeclarationExample#2](~/samples/snippets/csharp/VS_Snippets_CLR/CodeTypeDeclarationExample/CS/codetypedeclarationexample.cs#2)]
[!code-vb[CodeTypeDeclarationExample#2](~/samples/snippets/visualbasic/VS_Snippets_CLR/CodeTypeDeclarationExample/VB/codetypedeclarationexample.vb#2)]
]]></format>
</remarks>
<altmember cref="T:System.CodeDom.CodeTypeDeclarationCollection" />
<altmember cref="T:System.CodeDom.Compiler.GeneratorSupport" />
</Docs>
<Members>
<MemberGroup MemberName=".ctor">
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.CodeDom.CodeTypeDeclaration" /> class.</summary>
</Docs>
</MemberGroup>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public CodeTypeDeclaration ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:System.CodeDom.CodeTypeDeclaration.#ctor" />
<MemberSignature Language="VB.NET" Value="Public Sub New ()" />
<MemberSignature Language="C++ CLI" Value="public:
 CodeTypeDeclaration();" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.CodeDom</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters />
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.CodeDom.CodeTypeDeclaration" /> class.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public CodeTypeDeclaration (string name);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string name) cil managed" />
<MemberSignature Language="DocId" Value="M:System.CodeDom.CodeTypeDeclaration.#ctor(System.String)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (name As String)" />
<MemberSignature Language="C++ CLI" Value="public:
 CodeTypeDeclaration(System::String ^ name);" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.CodeDom</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="name" Type="System.String" />
</Parameters>
<Docs>
<param name="name">The name for the new type.</param>
<summary>Initializes a new instance of the <see cref="T:System.CodeDom.CodeTypeDeclaration" /> class with the specified name.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="BaseTypes">
<MemberSignature Language="C#" Value="public System.CodeDom.CodeTypeReferenceCollection BaseTypes { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.CodeDom.CodeTypeReferenceCollection BaseTypes" />
<MemberSignature Language="DocId" Value="P:System.CodeDom.CodeTypeDeclaration.BaseTypes" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property BaseTypes As CodeTypeReferenceCollection" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::CodeDom::CodeTypeReferenceCollection ^ BaseTypes { System::CodeDom::CodeTypeReferenceCollection ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.CodeDom</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.CodeDom.CodeTypeReferenceCollection</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the base types of the type.</summary>
<value>A <see cref="T:System.CodeDom.CodeTypeReferenceCollection" /> object that indicates the base types of the type.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
To generate a class in Visual Basic that does not inherit from a base type, but that does implement one or more interfaces, you must include <xref:System.Object> as the first item in the <xref:System.CodeDom.CodeTypeDeclaration.BaseTypes%2A> collection.
> [!NOTE]
> In the .NET Framework version 2.0 you do not need the <xref:System.CodeDom.CodeTypeReference> for <xref:System.Object> if the interface you are implementing already exists and you are referring to it by type. For example, if you are implementing the <xref:System.Collections.ICollection> interface and add it to the collection with this statement, `ctd.BaseTypes.Add(New CodeTypeReference(typeof(ICollection)))`, you do not need the preceding `ctd.BaseTypes.Add(New CodeTypeReference(GetType(Object)))` statement.
The following code illustrates the addition of a <xref:System.CodeDom.CodeTypeReference> to the collection that refers to <xref:System.Object>.
```vb
Dim ctd As New CodeTypeDeclaration("Class1")
ctd.IsClass = True
ctd.BaseTypes.Add(New CodeTypeReference(GetType(Object)))
ctd.BaseTypes.Add(New CodeTypeReference("Interface1"))
```
```csharp
CodeTypeDeclaration ctd = new CodeTypeDeclaration("Class1");
ctd.IsClass = true;
ctd.BaseTypes.Add(new CodeTypeReference(typeof(Object)));
ctd.BaseTypes.Add(new CodeTypeReference("Interface1"));
```
The preceding code generates the equivalent of the following Visual Basic code.
```vb
Public Class Class1
Implements Interface1
```
However, the Visual Basic code actually generated is the following.
```vb
Public Class Class1
Inherits Object
Implements Interface1
```
]]></format>
</remarks>
<altmember cref="T:System.CodeDom.CodeTypeReferenceCollection" />
</Docs>
</Member>
<Member MemberName="IsClass">
<MemberSignature Language="C#" Value="public bool IsClass { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool IsClass" />
<MemberSignature Language="DocId" Value="P:System.CodeDom.CodeTypeDeclaration.IsClass" />
<MemberSignature Language="VB.NET" Value="Public Property IsClass As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:
 property bool IsClass { bool get(); void set(bool value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.CodeDom</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value indicating whether the type is a class or reference type.</summary>
<value>
<see langword="true" /> if the type is a class or reference type; otherwise, <see langword="false" />.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="IsEnum">
<MemberSignature Language="C#" Value="public bool IsEnum { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool IsEnum" />
<MemberSignature Language="DocId" Value="P:System.CodeDom.CodeTypeDeclaration.IsEnum" />
<MemberSignature Language="VB.NET" Value="Public Property IsEnum As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:
 property bool IsEnum { bool get(); void set(bool value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.CodeDom</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value indicating whether the type is an enumeration.</summary>
<value>
<see langword="true" /> if the type is an enumeration; otherwise, <see langword="false" />.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="IsInterface">
<MemberSignature Language="C#" Value="public bool IsInterface { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool IsInterface" />
<MemberSignature Language="DocId" Value="P:System.CodeDom.CodeTypeDeclaration.IsInterface" />
<MemberSignature Language="VB.NET" Value="Public Property IsInterface As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:
 property bool IsInterface { bool get(); void set(bool value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.CodeDom</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value indicating whether the type is an interface.</summary>
<value>
<see langword="true" /> if the type is an interface; otherwise, <see langword="false" />.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="IsPartial">
<MemberSignature Language="C#" Value="public bool IsPartial { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool IsPartial" />
<MemberSignature Language="DocId" Value="P:System.CodeDom.CodeTypeDeclaration.IsPartial" />
<MemberSignature Language="VB.NET" Value="Public Property IsPartial As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:
 property bool IsPartial { bool get(); void set(bool value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.CodeDom</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value indicating whether the type declaration is complete or partial.</summary>
<value>
<see langword="true" /> if the class or structure declaration is a partial representation of the implementation; <see langword="false" /> if the declaration is a complete implementation of the class or structure. The default is <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
You can build a class or structure implementation in one complete declaration, or spread the implementation across multiple declarations. Implementations are commonly supplied in one complete type declaration. In this case, set the type declaration <xref:System.CodeDom.CodeTypeDeclaration.IsPartial%2A> property to `false`, which indicates that the type declaration represents all details for the class or structure implementation.
A partial type declaration makes it easier to build different portions of a class or structure implementation in different modules of your application. The partial type declarations can be stored in one source file, or spread across multiple source files that are eventually compiled together to form the combined type implementation.
The C# language supports partial type declarations of classes and structures through the `partial` keyword. Visual Basic supports partial type declarations of classes and structures with the `Partial` keyword. Not all code generators support partial type declarations, so you should test for this support by calling the <xref:System.CodeDom.Compiler.ICodeGenerator.Supports%2A> method with the flag <xref:System.CodeDom.Compiler.GeneratorSupport.PartialTypes>.
> [!NOTE]
> Partial type declarations are supported for classes and structures. If you specify a partial type declaration for an enumeration or interface, the generated code produces compiler errors.
When supplying a class or structure implementation across multiple declarations, set the <xref:System.CodeDom.CodeTypeDeclaration.IsPartial%2A> property to `true` for the initial declaration and all supplemental declarations. The initial declaration must fully specify the type signature, including access modifiers, inherited types, and implemented interfaces. The supplementary declarations do not need to re-specify the type signature. A compiler error typically results if you redefine the type signature in a supplementary declaration.
Visual Studio 2005 uses partial types to separate user-generated code from designer code. In Visual Basic Windows Application projects, the user code is placed in a partial class that is not qualified by the `Partial` keyword; the designer-provided code appears in the partial class that has the `Partial` keyword. In C#, both the user code and designer code appear in partial classes identified by the `partial` keyword.
## Examples
This example demonstrates using a <xref:System.CodeDom.CodeTypeDeclaration> to supply a class implementation across multiple declarations. The example builds the initial class declaration statement and sets the <xref:System.CodeDom.CodeTypeDeclaration.IsPartial%2A> property to `true`.
[!code-cpp[CodeDomPartialTypeExample#3](~/samples/snippets/cpp/VS_Snippets_CLR/CodeDomPartialTypeExample/CPP/source.cpp#3)]
[!code-csharp[CodeDomPartialTypeExample#3](~/samples/snippets/csharp/VS_Snippets_CLR/CodeDomPartialTypeExample/CS/source.cs#3)]
[!code-vb[CodeDomPartialTypeExample#3](~/samples/snippets/visualbasic/VS_Snippets_CLR/CodeDomPartialTypeExample/VB/source.vb#3)]
A different method in the example extends the class implementation. This method builds a new type declaration statement for the existing class and sets the <xref:System.CodeDom.CodeTypeDeclaration.IsPartial%2A> property to `true`. The compiler combines the two partial type declarations together for the complete class implementation.
[!code-cpp[CodeDomPartialTypeExample#7](~/samples/snippets/cpp/VS_Snippets_CLR/CodeDomPartialTypeExample/CPP/source.cpp#7)]
[!code-csharp[CodeDomPartialTypeExample#7](~/samples/snippets/csharp/VS_Snippets_CLR/CodeDomPartialTypeExample/CS/source.cs#7)]
[!code-vb[CodeDomPartialTypeExample#7](~/samples/snippets/visualbasic/VS_Snippets_CLR/CodeDomPartialTypeExample/VB/source.vb#7)]
]]></format>
</remarks>
<altmember cref="F:System.CodeDom.Compiler.GeneratorSupport.PartialTypes" />
</Docs>
</Member>
<Member MemberName="IsStruct">
<MemberSignature Language="C#" Value="public bool IsStruct { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool IsStruct" />
<MemberSignature Language="DocId" Value="P:System.CodeDom.CodeTypeDeclaration.IsStruct" />
<MemberSignature Language="VB.NET" Value="Public Property IsStruct As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:
 property bool IsStruct { bool get(); void set(bool value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.CodeDom</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value indicating whether the type is a value type (struct).</summary>
<value>
<see langword="true" /> if the type is a value type; otherwise, <see langword="false" />.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Members">
<MemberSignature Language="C#" Value="public System.CodeDom.CodeTypeMemberCollection Members { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.CodeDom.CodeTypeMemberCollection Members" />
<MemberSignature Language="DocId" Value="P:System.CodeDom.CodeTypeDeclaration.Members" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Members As CodeTypeMemberCollection" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::CodeDom::CodeTypeMemberCollection ^ Members { System::CodeDom::CodeTypeMemberCollection ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.CodeDom</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.CodeDom.CodeTypeMemberCollection</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the collection of class members for the represented type.</summary>
<value>A <see cref="T:System.CodeDom.CodeTypeMemberCollection" /> object that indicates the class members.</value>
<remarks>To be added.</remarks>
<altmember cref="T:System.CodeDom.CodeTypeMemberCollection" />
</Docs>
</Member>
<Member MemberName="PopulateBaseTypes">
<MemberSignature Language="C#" Value="public event EventHandler PopulateBaseTypes;" />
<MemberSignature Language="ILAsm" Value=".event class System.EventHandler PopulateBaseTypes" />
<MemberSignature Language="DocId" Value="E:System.CodeDom.CodeTypeDeclaration.PopulateBaseTypes" />
<MemberSignature Language="VB.NET" Value="Public Custom Event PopulateBaseTypes As EventHandler " />
<MemberSignature Language="C++ CLI" Value="public:
 event EventHandler ^ PopulateBaseTypes;" />
<MemberType>Event</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.CodeDom</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.EventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>Occurs when the <see cref="P:System.CodeDom.CodeTypeDeclaration.BaseTypes" /> collection is accessed for the first time.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="PopulateMembers">
<MemberSignature Language="C#" Value="public event EventHandler PopulateMembers;" />
<MemberSignature Language="ILAsm" Value=".event class System.EventHandler PopulateMembers" />
<MemberSignature Language="DocId" Value="E:System.CodeDom.CodeTypeDeclaration.PopulateMembers" />
<MemberSignature Language="VB.NET" Value="Public Custom Event PopulateMembers As EventHandler " />
<MemberSignature Language="C++ CLI" Value="public:
 event EventHandler ^ PopulateMembers;" />
<MemberType>Event</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.CodeDom</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.EventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>Occurs when the <see cref="P:System.CodeDom.CodeTypeDeclaration.Members" /> collection is accessed for the first time.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="TypeAttributes">
<MemberSignature Language="C#" Value="public System.Reflection.TypeAttributes TypeAttributes { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Reflection.TypeAttributes TypeAttributes" />
<MemberSignature Language="DocId" Value="P:System.CodeDom.CodeTypeDeclaration.TypeAttributes" />
<MemberSignature Language="VB.NET" Value="Public Property TypeAttributes As TypeAttributes" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::Reflection::TypeAttributes TypeAttributes { System::Reflection::TypeAttributes get(); void set(System::Reflection::TypeAttributes value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.CodeDom</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Reflection.TypeAttributes</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the attributes of the type.</summary>
<value>A <see cref="T:System.Reflection.TypeAttributes" /> object that indicates the attributes of the type.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Reflection.TypeAttributes> property contains the same type of values used by <xref:System.Reflection> when investigating a type at run time. Many of these flags do not correspond to the type declaration syntax for some languages. As a result, only the following flags are significant to <xref:System.CodeDom.CodeTypeDeclaration> : <xref:System.Reflection.TypeAttributes.Class>, <xref:System.Reflection.TypeAttributes.Interface>, <xref:System.Reflection.TypeAttributes.Abstract>, <xref:System.Reflection.TypeAttributes.Sealed>, <xref:System.Reflection.TypeAttributes.Public>, <xref:System.Reflection.TypeAttributes.NotPublic>, <xref:System.Reflection.TypeAttributes.NestedPublic>, and <xref:System.Reflection.TypeAttributes.NestedPrivate>.
> [!NOTE]
> Some of the flags such as <xref:System.Reflection.TypeAttributes.Abstract> overlap with the meaning of flags in the <xref:System.CodeDom.CodeTypeMember.Attributes%2A> property of <xref:System.CodeDom.CodeTypeDeclaration> that is inherited from <xref:System.CodeDom.CodeTypeMember>. The <xref:System.CodeDom.CodeTypeMember.Attributes%2A> property is a side effect of the <xref:System.CodeDom.CodeTypeDeclaration> class inheriting from <xref:System.CodeDom.CodeTypeMember> so that classes can be nested. The flags in the <xref:System.CodeDom.CodeTypeDeclaration.TypeAttributes%2A> property should be used instead of the flags in the <xref:System.CodeDom.CodeTypeMember.Attributes%2A> property.
> [!NOTE]
> The pattern for setting the visibility flags (flags containing the words `Public` or `Nested`) is to mask out all visibility flags using the <xref:System.Reflection.TypeAttributes.VisibilityMask> and then set the desired visibility flag. For example, the C# code statement to identify the <xref:System.CodeDom.CodeTypeDeclaration> (named `cd`) as an internal class is `cd.TypeAttributes = (cd.TypeAttributes & ~TypeAttributes.VisibilityMask) | TypeAttributes.NotPublic;`. The code to set the same value in Visual Basic is `cd.TypeAttributes = (cd.TypeAttributes And (TypeAttributes.VisibilityMask Xor -1)) Or TypeAttributes.NotPublic`. Setting the <xref:System.CodeDom.CodeTypeDeclaration.TypeAttributes%2A> property directly to a visibility flag (`cd.TypeAttributes = TypeAttributes.NotPublic;`) erases all other flags that might be set.
]]></format>
</remarks>
<altmember cref="T:System.Reflection.TypeAttributes" />
</Docs>
</Member>
<Member MemberName="TypeParameters">
<MemberSignature Language="C#" Value="public System.CodeDom.CodeTypeParameterCollection TypeParameters { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.CodeDom.CodeTypeParameterCollection TypeParameters" />
<MemberSignature Language="DocId" Value="P:System.CodeDom.CodeTypeDeclaration.TypeParameters" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property TypeParameters As CodeTypeParameterCollection" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::CodeDom::CodeTypeParameterCollection ^ TypeParameters { System::CodeDom::CodeTypeParameterCollection ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.CodeDom</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.Runtime.InteropServices.ComVisible(false)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.CodeDom.CodeTypeParameterCollection</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the type parameters for the type declaration.</summary>
<value>A <see cref="T:System.CodeDom.CodeTypeParameterCollection" /> that contains the type parameters for the type declaration.</value>
<remarks>
<format type="text/markdown"><.
]]></format>
</remarks>
<altmember cref="T:System.CodeDom.CodeTypeParameterCollection" />
<altmember cref="T:System.CodeDom.CodeTypeParameter" />
</Docs>
</Member>
</Members>
</Type>