อ่านในภาษาอังกฤษ แก้ไข

แชร์ผ่าน


CompilerErrorCollection Constructors

Definition

Initializes a new instance of the CompilerErrorCollection class.

Overloads

CompilerErrorCollection()

Initializes a new instance of the CompilerErrorCollection class.

CompilerErrorCollection(CompilerError[])

Initializes a new instance of CompilerErrorCollection that contains the specified array of CompilerError objects.

CompilerErrorCollection(CompilerErrorCollection)

Initializes a new instance of the CompilerErrorCollection class that contains the contents of the specified CompilerErrorCollection.

CompilerErrorCollection()

Source:
CompilerErrorCollection.cs
Source:
CompilerErrorCollection.cs
Source:
CompilerErrorCollection.cs
Source:
CompilerErrorCollection.cs
Source:
CompilerErrorCollection.cs

Initializes a new instance of the CompilerErrorCollection class.

C#
public CompilerErrorCollection();

Examples

The following example demonstrates how to create an empty instance of the CompilerErrorCollection class.

C#
// Creates an empty CompilerErrorCollection.
CompilerErrorCollection collection = new CompilerErrorCollection();

Applies to

.NET 10 (package-provided) และรุ่นอื่นๆ
ผลิตภัณฑ์ เวอร์ชัน
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

CompilerErrorCollection(CompilerError[])

Source:
CompilerErrorCollection.cs
Source:
CompilerErrorCollection.cs
Source:
CompilerErrorCollection.cs
Source:
CompilerErrorCollection.cs
Source:
CompilerErrorCollection.cs

Initializes a new instance of CompilerErrorCollection that contains the specified array of CompilerError objects.

C#
public CompilerErrorCollection(System.CodeDom.Compiler.CompilerError[] value);

Parameters

value
CompilerError[]

An array of CompilerError objects to initialize the collection with.

Exceptions

value is null.

Applies to

.NET 10 (package-provided) และรุ่นอื่นๆ
ผลิตภัณฑ์ เวอร์ชัน
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

CompilerErrorCollection(CompilerErrorCollection)

Source:
CompilerErrorCollection.cs
Source:
CompilerErrorCollection.cs
Source:
CompilerErrorCollection.cs
Source:
CompilerErrorCollection.cs
Source:
CompilerErrorCollection.cs

Initializes a new instance of the CompilerErrorCollection class that contains the contents of the specified CompilerErrorCollection.

C#
public CompilerErrorCollection(System.CodeDom.Compiler.CompilerErrorCollection value);

Parameters

value
CompilerErrorCollection

A CompilerErrorCollection object with which to initialize the collection.

Exceptions

value is null.

Applies to

.NET 10 (package-provided) และรุ่นอื่นๆ
ผลิตภัณฑ์ เวอร์ชัน
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10