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

CodeTypeOfExpression クラス

指定した型名Type返す式である、typeof 式を表します

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

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

実行時Type返す typeof 式を表す、CodeTypeOfExpression

Type プロパティは、Type オブジェクト返すデータ型指定します

CodeTypeReferenceExpression を使用すると、CodeCastExpression を作成して名前を指定した型にオブジェクトキャストするときのように、名前によって型を参照するソース コードを表すことができます

使用例使用例

CodeTypeOfExpression使用して typeof 式を表す例を次に示します

' Creates a reference to the System.DateTime type.
Dim typeRef1 As New CodeTypeReference("System.DateTime")

' Creates a typeof expression for the specified type reference.
Dim typeof1 As New CodeTypeOfExpression(typeRef1)

' A Visual Basic code generator produces the following source code for
 the preceeding example code:    

'       GetType(System.DateTime)            
// Creates a reference to the System.DateTime type.
CodeTypeReference typeRef1 = new CodeTypeReference("System.DateTime");

// Creates a typeof expression for the specified type reference.
CodeTypeOfExpression typeof1 = new CodeTypeOfExpression(typeRef1);

// A C# code generator produces the following source code for the preceeding
 example code:    

//    typeof(System.DateTime);            
// Creates a reference to the System.DateTime type.
CodeTypeReference^ typeRef1 = gcnew CodeTypeReference( "System.DateTime"
 );

// Creates a typeof expression for the specified type reference.
CodeTypeOfExpression^ typeof1 = gcnew CodeTypeOfExpression( typeRef1 );

// A C# code generator produces the following source code for the preceeding
 example code:
//    typeof(System.DateTime);
// Creates a reference to the System.DateTime type.
CodeTypeReference typeRef1 = new CodeTypeReference("System.DateTime");
// Creates a typeof expression for the specified type reference.
CodeTypeOfExpression typeof1 = new CodeTypeOfExpression(typeRef1);
// A VJ# code generator produces the following source code for the 
// preceeding example code:    
//    System.DateTime.class.ToType();           
継承階層継承階層
System.Object
   System.CodeDom.CodeObject
     System.CodeDom.CodeExpression
      System.CodeDom.CodeTypeOfExpression
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
CodeTypeOfExpression メンバ
System.CodeDom 名前空間
CodeTypeReferenceExpression

CodeTypeOfExpression コンストラクタ ()


CodeTypeOfExpression コンストラクタ (Type)


CodeTypeOfExpression コンストラクタ (String)


CodeTypeOfExpression コンストラクタ (CodeTypeReference)

CodeTypeOfExpression クラス新しインスタンス初期化します。

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

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

Dim instance As New CodeTypeOfExpression(type)
public CodeTypeOfExpression (
    CodeTypeReference type
)
public:
CodeTypeOfExpression (
    CodeTypeReference^ type
)
public CodeTypeOfExpression (
    CodeTypeReference type
)
public function CodeTypeOfExpression (
    type : CodeTypeReference
)

パラメータ

type

typeof 式のデータ型を示す CodeTypeReference。

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

CodeTypeOfExpression コンストラクタ

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

名前 説明
CodeTypeOfExpression () CodeTypeOfExpression クラス新しインスタンス初期化します。
CodeTypeOfExpression (CodeTypeReference) CodeTypeOfExpression クラス新しインスタンス初期化します。
CodeTypeOfExpression (String) 型を指定してCodeTypeOfExpression クラス新しインスタンス初期化します。
CodeTypeOfExpression (Type) 型を指定してCodeTypeOfExpression クラス新しインスタンス初期化します。
参照参照

関連項目

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

CodeTypeOfExpression プロパティ


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

参照参照

関連項目

CodeTypeOfExpression クラス
System.CodeDom 名前空間
CodeTypeReferenceExpression

CodeTypeOfExpression メソッド


CodeTypeOfExpression メンバ

指定した型名Type返す式である、typeof 式を表します

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


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

関連項目

CodeTypeOfExpression クラス
System.CodeDom 名前空間
CodeTypeReferenceExpression


このページでは「.NET Framework クラス ライブラリ リファレンス」からCodeTypeOfExpressionを検索した結果を表示しています。
Weblioに収録されているすべての辞書からCodeTypeOfExpressionを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からCodeTypeOfExpression を検索

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

辞書ショートカット

すべての辞書の索引

「CodeTypeOfExpression」の関連用語

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

   

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



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

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

©2025 GRAS Group, Inc.RSS