次の方法で共有


CodeCommentStatementCollection.Insert メソッド

コレクション内の指定したインデックス位置に、CodeCommentStatement を挿入します。

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

構文

'宣言
Public Sub Insert ( _
    index As Integer, _
    value As CodeCommentStatement _
)
'使用
Dim instance As CodeCommentStatementCollection
Dim index As Integer
Dim value As CodeCommentStatement

instance.Insert(index, value)
public void Insert (
    int index,
    CodeCommentStatement value
)
public:
void Insert (
    int index, 
    CodeCommentStatement^ value
)
public void Insert (
    int index, 
    CodeCommentStatement value
)
public function Insert (
    index : int, 
    value : CodeCommentStatement
)

パラメータ

  • index
    項目を挿入する位置の 0 から始まるインデックス番号。

使用例

' Inserts a CodeCommentStatement at index 0 of the collection.
collection.Insert(0, New CodeCommentStatement("Test comment"))
// Inserts a CodeCommentStatement at index 0 of the collection.
collection.Insert( 0, new CodeCommentStatement("Test comment") );
// Inserts a CodeCommentStatement at index 0 of the collection.
collection->Insert( 0, gcnew CodeCommentStatement( "Test comment" ) );
// Inserts a CodeCommentStatement at index 0 of the collection.
collection.Insert(0, new CodeCommentStatement("Test comment"));

プラットフォーム

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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。

バージョン情報

.NET Framework

サポート対象 : 2.0、1.1、1.0

参照

関連項目

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