CodeCommentStatement
メンバ
コンストラクタ
- public CodeCommentStatement();
-
- 概要
- System.CodeDom.CodeCommentStatement クラスの新しいインスタンスを初期化します。
- public CodeCommentStatement( CodeComment comment );
-
- 概要
- 新しいインスタンスを初期化、 System.CodeDom.CodeCommentStatement クラスの指定したコメントを使用します。
- パラメーター
-
- comment
- A System.CodeDom.CodeComment コメントすることを示します。
- public CodeCommentStatement( string text );
-
- 概要
- 新しいインスタンスを初期化、 System.CodeDom.CodeCommentStatement クラスの内容として、指定したテキストを使用します。
- パラメーター
-
- text
- コメントの内容。
- public CodeCommentStatement( string text, bool docComment );
-
- 概要
- テキストとドキュメント コメント フラグを指定して、CodeCommentStatement クラスの新しいインスタンスを初期化します。
- パラメーター
-
- text
- コメントの内容。
- docComment
- true ドキュメント コメントはコメントがある場合それ以外の場合、 falseです。
プロパティ
- public CodeComment Comment{ get; set; }
-
- 概要
- コメントの内容を取得または設定します。
- 戻り値
- A System.CodeDom.CodeComment コメントすることを示します。
- EndDirectives
- 終了ディレクティブを含む CodeDirectiveCollection オブジェクトを取得します。 (Inherited from CodeStatement )
- LinePragma
- コード ステートメントのある行を取得または設定します。 (Inherited from CodeStatement )
- StartDirectives
- 開始ディレクティブを含む CodeDirectiveCollection オブジェクトを取得します。 (Inherited from CodeStatement )
- UserData
- 現在のオブジェクトのユーザー定義可能なデータを取得します。 (Inherited from CodeObject )
メソッド
- Equals(Object)
- 指定したオブジェクトが、現在のオブジェクトと等しいかどうかを判断します。 (Inherited from Object)
- GetHashCode()
- 既定のハッシュ関数として機能します。 (Inherited from Object)
- GetType()
- 現在のインスタンスの Type を取得します。 (Inherited from Object)
- MemberwiseClone()
- 現在の Object の簡易コピーを作成します。 (Inherited from Object)
- ToString()
- 現在のオブジェクトを表す文字列を返します。 (Inherited from Object)
例
この例では、CodeCommentStatementをソース コードにコメントを表します。
// Create a CodeComment with some example comment text.
// ある例コメントテキストによってCodeCommentを作成しなさい。
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.
// コメントをCodeTypeDeclarationメンバーコレクションに追加するために、
// CodeCommentStatement コメントを含んでいる, を作成しなさい。
CodeCommentStatement commentStatement = new CodeCommentStatement( comment );
// A C# code generator produces the following source code for the preceeding example code:
// A C#コードジェネレータはpreceeding例コードのための以下のソースコードを作り出す:
// // This comment was generated from a System.CodeDom.CodeComment
定義
[System.Runtime.InteropServices.ComVisible(true)]
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)]
[System.Serializable]
public class CodeCommentStatement : System.CodeDom.CodeStatement
クラス
#region アセンブリ System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
// C:¥Program Files (x86)¥Reference Assemblies¥Microsoft¥Framework¥.NETFramework¥v4.6.1¥System.dll
#endregion
using System.Runtime.InteropServices;
namespace System.CodeDom
{
//
// 概要:
// 1 つのコメントから成るステートメントを表します。
[ClassInterface( ClassInterfaceType.AutoDispatch )]
[ComVisible( true )]
public class CodeCommentStatement : CodeStatement
{
//
// 概要:
// System.CodeDom.CodeCommentStatement クラスの新しいインスタンスを初期化します。
public CodeCommentStatement();
//
// 概要:
// 新しいインスタンスを初期化、 System.CodeDom.CodeCommentStatement クラスの指定したコメントを使用します。
//
// パラメーター:
// comment:
// A System.CodeDom.CodeComment コメントすることを示します。
public CodeCommentStatement( CodeComment comment );
//
// 概要:
// 新しいインスタンスを初期化、 System.CodeDom.CodeCommentStatement クラスの内容として、指定したテキストを使用します。
//
// パラメーター:
// text:
// コメントの内容。
public CodeCommentStatement( string text );
//
// 概要:
// 新しいインスタンスを初期化、 System.CodeDom.CodeCommentStatement クラスの指定したテキストとドキュメントのコメントのフラグを使用します。
//
// パラメーター:
// text:
// コメントの内容。
//
// docComment:
// true ドキュメント コメントはコメントがある場合それ以外の場合、 falseです。
public CodeCommentStatement( string text, bool docComment );
//
// 概要:
// 取得またはコメントの内容を設定します。
//
// 戻り値:
// A System.CodeDom.CodeComment コメントすることを示します。
public CodeComment Comment
{
get;
set;
}
}
}