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

CodeCommentStatement クラス

単一コメントから成るステートメント表します

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

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

CodeCommentStatement使用して単一行のコメント ステートメントを表すことができますCodeCommentStatementステートメントのため、ステートメント コレクション挿入でき、単独の行として表示されます。また、CodeCommentStatement は、CodeNamespace のコメント コレクションや、CodeTypeMember から派生する任意のオブジェクト追加することもできます

使用例使用例

CodeCommentStatement使用してソース コード内のコメントを表す例を次に示します

' Create a CodeComment with some example comment text.
Dim comment As New CodeComment(
 _
   "This comment was generated from a System.CodeDom.CodeComment",
 _
   False) ' Whether the comment is a documentation
 comment.

' Create a CodeCommentStatement that contains the comment, in order
' to add the comment to a CodeTypeDeclaration Members collection.
Dim commentStatement As New
 CodeCommentStatement(comment)    

' A Visual Basic code generator produces the following source code for
 the preceeding example code:
    
' 'This comment was generated from a System.CodeDom.CodeComment
// Create a CodeComment with some example comment text.
CodeComment comment = new CodeComment(
    // The text of the comment.
    "This comment was generated from a System.CodeDom.CodeComment",
    // Whether the comment is a comment intended for documentation purposes.
    false );

// Create a CodeCommentStatement that contains the comment, in order
// to add the comment to a CodeTypeDeclaration Members collection.
CodeCommentStatement commentStatement = new CodeCommentStatement(
 comment );

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

// // This comment was generated from a System.CodeDom.CodeComment
// Create a CodeComment with some example comment text.

// The text of the comment.
// Whether the comment is a comment intended for documentation purposes.
CodeComment^ comment = gcnew CodeComment( "This comment was generated from a
 System.CodeDom.CodeComment",false );

// Create a CodeCommentStatement that contains the comment, in order
// to add the comment to a CodeTypeDeclaration Members collection.
CodeCommentStatement^ commentStatement = gcnew CodeCommentStatement( comment );

// A C# code generator produces the following source code for the preceeding
 example code:
// // This comment was generated from a System.CodeDom.CodeComment
// Create a CodeComment with some example comment text.
CodeComment comment = new CodeComment("This comment was generated
 "
    + "from a System.CodeDom.CodeComment", false);
// The text of the comment.
// Whether the comment is a comment intended for documentation purposes.
// Create a CodeCommentStatement that contains the comment, in order
// to add the comment to a CodeTypeDeclaration Members collection.
CodeCommentStatement commentStatement = new 
    CodeCommentStatement(comment);
// A VJ# code generator produces the following source code for the 
// preceeding example code:
// This comment was generated from a System.CodeDom.CodeComment
継承階層継承階層
System.Object
   System.CodeDom.CodeObject
     System.CodeDom.CodeStatement
      System.CodeDom.CodeCommentStatement
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


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

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

辞書ショートカット

すべての辞書の索引

「CodeCommentStatement クラス」の関連用語

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

   

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



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

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

©2025 GRAS Group, Inc.RSS