CodeBinaryOperatorExpression クラスとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > CodeBinaryOperatorExpression クラスの意味・解説 

CodeBinaryOperatorExpression クラス

2 つの式の間の二項演算から構成される式を表します

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

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

CodeBinaryOperatorExpression使用して二項演算子含んだコード式を表すことができます二項演算子には、等値演算子 (==)、加算演算子 (+)、ビット処理演算子 (|) などがあります。CodeBinaryOperatorType 列挙体は、多く言語サポートする基本的一般に使用される二項演算子表します

使用例使用例

CodeBinaryOperatorExpression使用して 2 つ数値加算する例を次に示します

' This CodeBinaryOperatorExpression represents the addition of 1 and
 2.
Dim addMethod As New CodeBinaryOperatorExpression(
 _
   New CodePrimitiveExpression(1), _         
   CodeBinaryOperatorType.Add, _            
   New CodePrimitiveExpression(2) )        

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

' (1 + 2)

// This CodeBinaryOperatorExpression represents the addition of 1 and
 2.
CodeBinaryOperatorExpression addMethod = new CodeBinaryOperatorExpression(
    
    // Left operand.
    new CodePrimitiveExpression(1),
    
    // CodeBinaryOperatorType enumeration value of Add.
    CodeBinaryOperatorType.Add,
    
    // Right operand.
    new CodePrimitiveExpression(2) );    

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

// (1 + 2)        

// This CodeBinaryOperatorExpression represents the addition of 1 and
 2.

// Right operand.
CodeBinaryOperatorExpression^ addMethod = gcnew CodeBinaryOperatorExpression( gcnew
 CodePrimitiveExpression( 1 ),CodeBinaryOperatorType::Add,gcnew CodePrimitiveExpression(
 2 ) );

// A C# code generator produces the following source code for the preceeding
 example code:
// (1 + 2)        
// This CodeBinaryOperatorExpression represents the addition of 1 and
 2.
CodeBinaryOperatorExpression addMethod = new 
    CodeBinaryOperatorExpression(
    // Left operand.
    new CodePrimitiveExpression(System.Convert.ToString(1)),
    // CodeBinaryOperatorType enumeration value of Add.
    CodeBinaryOperatorType.Add,
    // Right operand.
    new CodePrimitiveExpression(System.Convert.ToString(2)));
// A VJ# code generator produces the following source code 
// for the preceeding example code:
// (1 + 2)        
継承階層継承階層
System.Object
   System.CodeDom.CodeObject
     System.CodeDom.CodeExpression
      System.CodeDom.CodeBinaryOperatorExpression
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
CodeBinaryOperatorExpression メンバ
System.CodeDom 名前空間
CodeExpression
CodeBinaryOperatorType



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

辞書ショートカット

すべての辞書の索引

「CodeBinaryOperatorExpression クラス」の関連用語

CodeBinaryOperatorExpression クラスのお隣キーワード
検索ランキング

   

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



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

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

©2024 GRAS Group, Inc.RSS