CodeAttributeDeclarationとは? わかりやすく解説

CodeAttributeDeclaration クラス

属性宣言表します

名前空間: System.CodeDom
アセンブリ: System (system.dll 内)
構文構文

<SerializableAttribute> _
<ComVisibleAttribute(True)> _
<ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)> _
Public Class CodeAttributeDeclaration
Dim instance As CodeAttributeDeclaration
[SerializableAttribute] 
[ComVisibleAttribute(true)] 
[ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)] 
public class CodeAttributeDeclaration
[SerializableAttribute] 
[ComVisibleAttribute(true)] 
[ClassInterfaceAttribute(ClassInterfaceType::AutoDispatch)] 
public ref class CodeAttributeDeclaration
/** @attribute SerializableAttribute() */ 
/** @attribute ComVisibleAttribute(true) */ 
/** @attribute ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch) */ 
public class CodeAttributeDeclaration
SerializableAttribute 
ComVisibleAttribute(true) 
ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch) 
public class CodeAttributeDeclaration
解説解説

CodeAttributeDeclaration使用して属性宣言する式を表すことができます。この属性属性名と引数は、オブジェクトプロパティとして保存されます。CodeAttributeArgument を使用して属性の各引数を表すことができます

使用例使用例

引数false指定した CLSCompliantAttribute を宣言する CodeAttributeDeclaration作成するコード例次に示します

CodeAttributeDeclaration declaration1 = new CodeAttributeDeclaration(
    "System.CLSCompliantAttribute", 
    new CodeAttributeArgument(new CodePrimitiveExpression(false)));

// A C# code generator produces the following source code for the 
// preceeding example code:
// [CLSCompliantAttribute(false)]
Dim declaration1 As New
 CodeAttributeDeclaration( _
    "System.CLSCompliantAttribute", _
    new CodeAttributeArgument(new CodePrimitiveExpression(false)))

' A Visual Basic code generator produces the following source code 
' for the preceeding example code:
' <CLSCompliantAttribute(false)>
継承階層継承階層
System.Object
  System.CodeDom.CodeAttributeDeclaration
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
CodeAttributeDeclaration メンバ
System.CodeDom 名前空間
CodeAttributeDeclarationCollection
CodeAttributeArgument クラス

CodeAttributeDeclaration コンストラクタ ()


CodeAttributeDeclaration コンストラクタ (String, CodeAttributeArgument[])

名前と引数指定して、CodeAttributeDeclaration クラス新しインスタンス初期化します。

名前空間: System.CodeDom
アセンブリ: System (system.dll 内)
構文構文

Public Sub New ( _
    name As String, _
    ParamArray arguments As CodeAttributeArgument()
 _
)
Dim name As String
Dim arguments As CodeAttributeArgument()

Dim instance As New CodeAttributeDeclaration(name,
 arguments)
public CodeAttributeDeclaration (
    string name,
    params CodeAttributeArgument[] arguments
)
public:
CodeAttributeDeclaration (
    String^ name, 
    ... array<CodeAttributeArgument^>^ arguments
)
public CodeAttributeDeclaration (
    String name, 
    CodeAttributeArgument[] arguments
)
public function CodeAttributeDeclaration (
    name : String, 
    ... arguments : CodeAttributeArgument[]
)

パラメータ

name

属性の名前。

arguments

属性引数を含む CodeAttributeArgument 型の配列

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
CodeAttributeDeclaration クラス
CodeAttributeDeclaration メンバ
System.CodeDom 名前空間

CodeAttributeDeclaration コンストラクタ (CodeTypeReference)

メモ : このコンストラクタは、.NET Framework version 2.0新しく追加されたものです。

コード参照指定して、CodeAttributeDeclaration クラス新しインスタンス初期化します。

名前空間: System.CodeDom
アセンブリ: System (system.dll 内)
構文構文

Public Sub New ( _
    attributeType As CodeTypeReference _
)
Dim attributeType As CodeTypeReference

Dim instance As New CodeAttributeDeclaration(attributeType)
public CodeAttributeDeclaration (
    CodeTypeReference attributeType
)
public:
CodeAttributeDeclaration (
    CodeTypeReference^ attributeType
)
public CodeAttributeDeclaration (
    CodeTypeReference attributeType
)
public function CodeAttributeDeclaration (
    attributeType : CodeTypeReference
)

パラメータ

attributeType

属性を示す CodeTypeReference。

解説解説

attributeType パラメータは、AttributeType プロパティおよび Name プロパティ設定使用されます。

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
CodeAttributeDeclaration クラス
CodeAttributeDeclaration メンバ
System.CodeDom 名前空間
Name

CodeAttributeDeclaration コンストラクタ (CodeTypeReference, CodeAttributeArgument[])

メモ : このコンストラクタは、.NET Framework version 2.0新しく追加されたものです。

コード参照引数指定して、CodeAttributeDeclaration クラス新しインスタンス初期化します。

名前空間: System.CodeDom
アセンブリ: System (system.dll 内)
構文構文

Public Sub New ( _
    attributeType As CodeTypeReference, _
    ParamArray arguments As CodeAttributeArgument()
 _
)
Dim attributeType As CodeTypeReference
Dim arguments As CodeAttributeArgument()

Dim instance As New CodeAttributeDeclaration(attributeType,
 arguments)
public CodeAttributeDeclaration (
    CodeTypeReference attributeType,
    params CodeAttributeArgument[] arguments
)
public:
CodeAttributeDeclaration (
    CodeTypeReference^ attributeType, 
    ... array<CodeAttributeArgument^>^ arguments
)
public CodeAttributeDeclaration (
    CodeTypeReference attributeType, 
    CodeAttributeArgument[] arguments
)
public function CodeAttributeDeclaration (
    attributeType : CodeTypeReference, 
    ... arguments : CodeAttributeArgument[]
)

パラメータ

attributeType

属性を示す CodeTypeReference。

arguments

属性引数を含む CodeAttributeArgument 型の配列

解説解説
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
CodeAttributeDeclaration クラス
CodeAttributeDeclaration メンバ
System.CodeDom 名前空間
Name
Arguments

CodeAttributeDeclaration コンストラクタ

CodeAttributeDeclaration クラス新しインスタンス初期化します。
オーバーロードの一覧オーバーロードの一覧

名前 説明
CodeAttributeDeclaration () CodeAttributeDeclaration クラス新しインスタンス初期化します。
CodeAttributeDeclaration (CodeTypeReference) コード参照指定してCodeAttributeDeclaration クラス新しインスタンス初期化します。
CodeAttributeDeclaration (String) 名前を指定してCodeAttributeDeclaration クラス新しインスタンス初期化します。
CodeAttributeDeclaration (CodeTypeReference, CodeAttributeArgument[]) コード参照引数指定してCodeAttributeDeclaration クラス新しインスタンス初期化します。
CodeAttributeDeclaration (String, CodeAttributeArgument[]) 名前と引数指定してCodeAttributeDeclaration クラス新しインスタンス初期化します。
参照参照

関連項目

CodeAttributeDeclaration クラス
CodeAttributeDeclaration メンバ
System.CodeDom 名前空間

CodeAttributeDeclaration コンストラクタ (String)


CodeAttributeDeclaration プロパティ


パブリック プロパティパブリック プロパティ

参照参照

関連項目

CodeAttributeDeclaration クラス
System.CodeDom 名前空間
CodeAttributeDeclarationCollection
CodeAttributeArgument クラス

CodeAttributeDeclaration メソッド


CodeAttributeDeclaration メンバ

属性宣言表します

CodeAttributeDeclaration データ型公開されるメンバを以下の表に示します


パブリック コンストラクタパブリック コンストラクタ
  名前 説明
パブリック メソッド CodeAttributeDeclaration オーバーロードされます。 CodeAttributeDeclaration クラス新しインスタンス初期化します。
パブリック プロパティパブリック プロパティ
パブリック メソッドパブリック メソッド
プロテクト メソッドプロテクト メソッド
参照参照

関連項目

CodeAttributeDeclaration クラス
System.CodeDom 名前空間
CodeAttributeDeclarationCollection
CodeAttributeArgument クラス



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「CodeAttributeDeclaration」の関連用語

CodeAttributeDeclarationのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



CodeAttributeDeclarationのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2024 Microsoft.All rights reserved.

©2024 GRAS Group, Inc.RSS