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

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

CodeCommentStatementCollection クラス

CodeCommentStatement オブジェクトコレクション表します

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

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

CodeCommentStatementCollection クラスは、CodeCommentStatement オブジェクトセット格納するために使用できる単純なコレクション オブジェクト提供します

使用例使用例
' Creates an empty CodeCommentStatementCollection.
Dim collection As New CodeCommentStatementCollection()

' Adds a CodeCommentStatement to the collection.
collection.Add(New CodeCommentStatement("Test
 comment"))

' Adds an array of CodeCommentStatement objects to the collection.
Dim comments As CodeCommentStatement() = {New
 CodeCommentStatement("Test comment"), New
 CodeCommentStatement("Another test comment")}
collection.AddRange(comments)

' Adds a collection of CodeCommentStatement objects to the 
' collection.
Dim commentsCollection As New
 CodeCommentStatementCollection()
commentsCollection.Add(New CodeCommentStatement("Test
 comment"))
commentsCollection.Add(New CodeCommentStatement("Another
 test comment"))
collection.AddRange(commentsCollection)

' Tests for the presence of a CodeCommentStatement in the 
' collection, and retrieves its index if it is found.
Dim testComment As New CodeCommentStatement("Test
 comment")
Dim itemIndex As Integer
 = -1
If collection.Contains(testComment) Then
    itemIndex = collection.IndexOf(testComment)
End If

' Copies the contents of the collection beginning at index 0 to the
 specified CodeCommentStatement array.
' 'comments' is a CodeCommentStatement array.
collection.CopyTo(comments, 0)

' Retrieves the count of the items in the collection.
Dim collectionCount As Integer
 = collection.Count

' Inserts a CodeCommentStatement at index 0 of the collection.
collection.Insert(0, New CodeCommentStatement("Test
 comment"))

' Removes the specified CodeCommentStatement from the collection.
Dim comment As New CodeCommentStatement("Test
 comment")
collection.Remove(comment)

' Removes the CodeCommentStatement at index 0.
collection.RemoveAt(0)
// Creates an empty CodeCommentStatementCollection.
CodeCommentStatementCollection collection = new CodeCommentStatementCollection();

// Adds a CodeCommentStatement to the collection.
collection.Add( new CodeCommentStatement("Test comment")
 );

// Adds an array of CodeCommentStatement objects to the collection.
CodeCommentStatement[] comments = { new CodeCommentStatement("Test
 comment"), new CodeCommentStatement("Another test
 comment") };
collection.AddRange( comments );

// Adds a collection of CodeCommentStatement objects to the collection.
CodeCommentStatementCollection commentsCollection = new CodeCommentStatementCollection();
commentsCollection.Add( new CodeCommentStatement("Test comment")
 );
commentsCollection.Add( new CodeCommentStatement("Another
 test comment") );
collection.AddRange( commentsCollection );

// Tests for the presence of a CodeCommentStatement in the 
// collection, and retrieves its index if it is found.
CodeCommentStatement testComment = new CodeCommentStatement("Test
 comment");
int itemIndex = -1;
if( collection.Contains( testComment ) )
    itemIndex = collection.IndexOf( testComment );

// Copies the contents of the collection, beginning at index 0, 
// to the specified CodeCommentStatement array.
// 'comments' is a CodeCommentStatement array.
collection.CopyTo( comments, 0 );

// Retrieves the count of the items in the collection.
int collectionCount = collection.Count;

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

// Removes the specified CodeCommentStatement from the collection.
CodeCommentStatement comment = new CodeCommentStatement("Test
 comment");
collection.Remove( comment );

// Removes the CodeCommentStatement at index 0.
collection.RemoveAt(0);
// Creates an empty CodeCommentStatementCollection.
CodeCommentStatementCollection^ collection = gcnew CodeCommentStatementCollection;

// Adds a CodeCommentStatement to the collection.
collection->Add( gcnew CodeCommentStatement( "Test comment" ) );

// Adds an array of CodeCommentStatement objects to the collection.
array<CodeCommentStatement^>^comments = {gcnew CodeCommentStatement( "Test
 comment" ),gcnew CodeCommentStatement( "Another test comment" )};
collection->AddRange( comments );

// Adds a collection of CodeCommentStatement objects to the collection.
CodeCommentStatementCollection^ commentsCollection = gcnew CodeCommentStatementCollection;
commentsCollection->Add( gcnew CodeCommentStatement( "Test comment"
 ) );
commentsCollection->Add( gcnew CodeCommentStatement( "Another test comment"
 ) );
collection->AddRange( commentsCollection );

// Tests for the presence of a CodeCommentStatement in the 
// collection, and retrieves its index if it is found.
CodeCommentStatement^ testComment = gcnew CodeCommentStatement( "Test comment"
 );
int itemIndex = -1;
if ( collection->Contains( testComment ) )
   itemIndex = collection->IndexOf( testComment );

// Copies the contents of the collection, beginning at index 0, 
// to the specified CodeCommentStatement array.
// 'comments' is a CodeCommentStatement array.
collection->CopyTo( comments, 0 );

// Retrieves the count of the items in the collection.
int collectionCount = collection->Count;

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

// Removes the specified CodeCommentStatement from the collection.
CodeCommentStatement^ comment = gcnew CodeCommentStatement( "Test comment"
 );
collection->Remove( comment );

// Removes the CodeCommentStatement at index 0.
collection->RemoveAt( 0 );
// Creates an empty CodeCommentStatementCollection.
CodeCommentStatementCollection collection = new 
    CodeCommentStatementCollection();

// Adds a CodeCommentStatement to the collection.
collection.Add(new CodeCommentStatement("Test comment"));

// Adds an array of CodeCommentStatement objects to the collection.
CodeCommentStatement comments[] =  { new CodeCommentStatement(
    "Test comment"), new CodeCommentStatement("Another
 test comment") };
collection.AddRange(comments);
// Adds a collection of CodeCommentStatement objects to the collection.
CodeCommentStatementCollection commentsCollection = new 
    CodeCommentStatementCollection();
commentsCollection.Add(new CodeCommentStatement("Test comment"));
commentsCollection.Add(new CodeCommentStatement("Another
 test comment"));
collection.AddRange(commentsCollection);

// Tests for the presence of a CodeCommentStatement in the 
// collection, and retrieves its index if it is found.
CodeCommentStatement testComment = new 
    CodeCommentStatement("Test comment");
int itemIndex = -1;
if (collection.Contains(testComment)) {
    itemIndex = collection.IndexOf(testComment);
}

// Copies the contents of the collection, beginning at index 0, 
// to the specified CodeCommentStatement array.
// 'comments' is a CodeCommentStatement array.
collection.CopyTo(comments, 0);

// Retrieves the count of the items in the collection.
int collectionCount = collection.get_Count();

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

// Removes the specified CodeCommentStatement from the collection.
CodeCommentStatement comment = new CodeCommentStatement("Test
 comment");
collection.Remove(comment);

// Removes the CodeCommentStatement at index 0.
collection.RemoveAt(0);
継承階層継承階層
System.Object
   System.Collections.CollectionBase
    System.CodeDom.CodeCommentStatementCollection
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
CodeCommentStatementCollection メンバ
System.CodeDom 名前空間
CodeCommentStatement クラス



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

辞書ショートカット

すべての辞書の索引

「CodeCommentStatementCollection クラス」の関連用語

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

   

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



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

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

©2024 GRAS Group, Inc.RSS