Edit

Share via


CodeAttributeDeclaration Constructors

Definition

Initializes a new instance of the CodeAttributeDeclaration class.

Overloads

CodeAttributeDeclaration()

Initializes a new instance of the CodeAttributeDeclaration class.

CodeAttributeDeclaration(CodeTypeReference)

Initializes a new instance of the CodeAttributeDeclaration class using the specified code type reference.

CodeAttributeDeclaration(String)

Initializes a new instance of the CodeAttributeDeclaration class using the specified name.

CodeAttributeDeclaration(CodeTypeReference, CodeAttributeArgument[])

Initializes a new instance of the CodeAttributeDeclaration class using the specified code type reference and arguments.

CodeAttributeDeclaration(String, CodeAttributeArgument[])

Initializes a new instance of the CodeAttributeDeclaration class using the specified name and arguments.

CodeAttributeDeclaration()

Source:
CodeAttributeDeclaration.cs
Source:
CodeAttributeDeclaration.cs
Source:
CodeAttributeDeclaration.cs
Source:
CodeAttributeDeclaration.cs
Source:
CodeAttributeDeclaration.cs

Initializes a new instance of the CodeAttributeDeclaration class.

C#
public CodeAttributeDeclaration();

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.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 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

CodeAttributeDeclaration(CodeTypeReference)

Source:
CodeAttributeDeclaration.cs
Source:
CodeAttributeDeclaration.cs
Source:
CodeAttributeDeclaration.cs
Source:
CodeAttributeDeclaration.cs
Source:
CodeAttributeDeclaration.cs

Initializes a new instance of the CodeAttributeDeclaration class using the specified code type reference.

C#
public CodeAttributeDeclaration(System.CodeDom.CodeTypeReference attributeType);

Parameters

attributeType
CodeTypeReference

The CodeTypeReference that identifies the attribute.

Remarks

The attributeType parameter is used to set the AttributeType and Name properties.

See also

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 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 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

CodeAttributeDeclaration(String)

Source:
CodeAttributeDeclaration.cs
Source:
CodeAttributeDeclaration.cs
Source:
CodeAttributeDeclaration.cs
Source:
CodeAttributeDeclaration.cs
Source:
CodeAttributeDeclaration.cs

Initializes a new instance of the CodeAttributeDeclaration class using the specified name.

C#
public CodeAttributeDeclaration(string name);

Parameters

name
String

The name of the attribute.

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.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 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

CodeAttributeDeclaration(CodeTypeReference, CodeAttributeArgument[])

Source:
CodeAttributeDeclaration.cs
Source:
CodeAttributeDeclaration.cs
Source:
CodeAttributeDeclaration.cs
Source:
CodeAttributeDeclaration.cs
Source:
CodeAttributeDeclaration.cs

Initializes a new instance of the CodeAttributeDeclaration class using the specified code type reference and arguments.

C#
public CodeAttributeDeclaration(System.CodeDom.CodeTypeReference attributeType, params System.CodeDom.CodeAttributeArgument[] arguments);

Parameters

attributeType
CodeTypeReference

The CodeTypeReference that identifies the attribute.

arguments
CodeAttributeArgument[]

An array of type CodeAttributeArgument that contains the arguments for the attribute.

Remarks

The attributeType parameter is used to set the AttributeType and Name properties, and the arguments parameter is used to set the Arguments property for the CodeAttributeDeclaration.

See also

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 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 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

CodeAttributeDeclaration(String, CodeAttributeArgument[])

Source:
CodeAttributeDeclaration.cs
Source:
CodeAttributeDeclaration.cs
Source:
CodeAttributeDeclaration.cs
Source:
CodeAttributeDeclaration.cs
Source:
CodeAttributeDeclaration.cs

Initializes a new instance of the CodeAttributeDeclaration class using the specified name and arguments.

C#
public CodeAttributeDeclaration(string name, params System.CodeDom.CodeAttributeArgument[] arguments);

Parameters

name
String

The name of the attribute.

arguments
CodeAttributeArgument[]

An array of type CodeAttributeArgument that contains the arguments for the attribute.

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.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 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10