CodeCastExpression クラス
アセンブリ: System (system.dll 内)

<SerializableAttribute> _ <ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)> _ <ComVisibleAttribute(True)> _ Public Class CodeCastExpression Inherits CodeExpression
[SerializableAttribute] [ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)] [ComVisibleAttribute(true)] public class CodeCastExpression : CodeExpression
[SerializableAttribute] [ClassInterfaceAttribute(ClassInterfaceType::AutoDispatch)] [ComVisibleAttribute(true)] public ref class CodeCastExpression : public CodeExpression

CodeCastExpression を使用して、別のデータ型またはインターフェイスにキャストする式を表すことができます。
Expression プロパティは、キャストする CodeExpression を示します。TargetType プロパティは、キャスト先の型を示します。

CodeCastExpression を使用して、System.Int32 の値を System.Int64 のデータ型にキャストする例を次に示します。
' This CodeCastExpression casts an Int32 of 1000 to an Int64. Dim castExpression As New CodeCastExpression( _ "System.Int64", New CodePrimitiveExpression(1000) ) ' A Visual Basic code generator produces the following source code for the preceeding example code: ' CType(1000,Long)
// This CodeCastExpression casts an Int32 of 1000 to an Int64. CodeCastExpression castExpression = new CodeCastExpression( // targetType parameter indicating the target type of the cast. "System.Int64", // The CodeExpression to cast, here an Int32 value of 1000. new CodePrimitiveExpression(1000) ); // A C# code generator produces the following source code for the preceeding example code: // ((long)(1000));
// This CodeCastExpression casts an Int32 of 1000 to an Int64. // targetType parameter indicating the target type of the cast. // The CodeExpression to cast, here an Int32 value of 1000. CodeCastExpression^ castExpression = gcnew CodeCastExpression( "System.Int64",gcnew CodePrimitiveExpression( 1000 ) ); // A C# code generator produces the following source code for the preceeding example code: // ((long)(1000));
// This CodeCastExpression casts an Int32 of 1000 to an Int64. CodeCastExpression castExpression = new CodeCastExpression( // targetType parameter indicating the target type of the cast. "System.Int64", // The CodeExpression to cast, here an Int32 value of 1000. new CodePrimitiveExpression(System.Convert.ToString(1000))); // A VJ# code generator produces the following source code for // the preceeding example code: // (System.Convert.ToInt64(1000));

System.CodeDom.CodeObject
System.CodeDom.CodeExpression
System.CodeDom.CodeCastExpression


Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


CodeCastExpression コンストラクタ ()
アセンブリ: System (system.dll 内)


Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


CodeCastExpression コンストラクタ (CodeTypeReference, CodeExpression)
アセンブリ: System (system.dll 内)

Public Sub New ( _ targetType As CodeTypeReference, _ expression As CodeExpression _ )
Dim targetType As CodeTypeReference Dim expression As CodeExpression Dim instance As New CodeCastExpression(targetType, expression)
public CodeCastExpression ( CodeTypeReference targetType, CodeExpression expression )
public: CodeCastExpression ( CodeTypeReference^ targetType, CodeExpression^ expression )
public CodeCastExpression ( CodeTypeReference targetType, CodeExpression expression )
public function CodeCastExpression ( targetType : CodeTypeReference, expression : CodeExpression )
- expression
キャストする CodeExpression。

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


CodeCastExpression コンストラクタ (String, CodeExpression)
アセンブリ: System (system.dll 内)

Public Sub New ( _ targetType As String, _ expression As CodeExpression _ )
Dim targetType As String Dim expression As CodeExpression Dim instance As New CodeCastExpression(targetType, expression)
public CodeCastExpression ( string targetType, CodeExpression expression )
public: CodeCastExpression ( String^ targetType, CodeExpression^ expression )
public CodeCastExpression ( String targetType, CodeExpression expression )
public function CodeCastExpression ( targetType : String, expression : CodeExpression )
- expression
キャストする CodeExpression。

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


CodeCastExpression コンストラクタ

名前 | 説明 |
---|---|
CodeCastExpression () | CodeCastExpression クラスの新しいインスタンスを初期化します。 |
CodeCastExpression (CodeTypeReference, CodeExpression) | キャスト先の型と式を指定して、CodeCastExpression クラスの新しいインスタンスを初期化します。 |
CodeCastExpression (String, CodeExpression) | キャスト先の型と式を指定して、CodeCastExpression クラスの新しいインスタンスを初期化します。 |
CodeCastExpression (Type, CodeExpression) | キャスト先の型と式を指定して、CodeCastExpression クラスの新しいインスタンスを初期化します。 |

CodeCastExpression コンストラクタ (Type, CodeExpression)
アセンブリ: System (system.dll 内)

Public Sub New ( _ targetType As Type, _ expression As CodeExpression _ )
Dim targetType As Type Dim expression As CodeExpression Dim instance As New CodeCastExpression(targetType, expression)
public CodeCastExpression ( Type targetType, CodeExpression expression )
public: CodeCastExpression ( Type^ targetType, CodeExpression^ expression )
public CodeCastExpression ( Type targetType, CodeExpression expression )
public function CodeCastExpression ( targetType : Type, expression : CodeExpression )
- expression
キャストする CodeExpression。

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


CodeCastExpression プロパティ

名前 | 説明 | |
---|---|---|
![]() | Expression | キャストする式を取得または設定します。 |
![]() | TargetType | キャスト先の型を取得または設定します。 |
![]() | UserData | 現在のオブジェクトのユーザー定義可能なデータを取得または設定します。 ( CodeObject から継承されます。) |

CodeCastExpression メソッド

名前 | 説明 | |
---|---|---|
![]() | Equals | オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 ( Object から継承されます。) |
![]() | GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 ( Object から継承されます。) |
![]() | GetType | 現在のインスタンスの Type を取得します。 ( Object から継承されます。) |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 ( Object から継承されます。) |
![]() | ToString | 現在の Object を表す String を返します。 ( Object から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 ( Object から継承されます。) |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 ( Object から継承されます。) |

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


名前 | 説明 | |
---|---|---|
![]() | Expression | キャストする式を取得または設定します。 |
![]() | TargetType | キャスト先の型を取得または設定します。 |
![]() | UserData | 現在のオブジェクトのユーザー定義可能なデータを取得または設定します。(CodeObject から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | Equals | オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 (Object から継承されます。) |
![]() | GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 (Object から継承されます。) |
![]() | GetType | 現在のインスタンスの Type を取得します。 (Object から継承されます。) |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 (Object から継承されます。) |
![]() | ToString | 現在の Object を表す String を返します。 (Object から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 (Object から継承されます。) |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 (Object から継承されます。) |

Weblioに収録されているすべての辞書からCodeCastExpressionを検索する場合は、下記のリンクをクリックしてください。

- CodeCastExpressionのページへのリンク