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

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

CodeCatchClauseCollection クラス

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

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

<SerializableAttribute> _
<ComVisibleAttribute(True)> _
<ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)> _
Public Class CodeCatchClauseCollection
    Inherits CollectionBase
Dim instance As CodeCatchClauseCollection
[SerializableAttribute] 
[ComVisibleAttribute(true)] 
[ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)] 
public class CodeCatchClauseCollection : CollectionBase
[SerializableAttribute] 
[ComVisibleAttribute(true)] 
[ClassInterfaceAttribute(ClassInterfaceType::AutoDispatch)] 
public ref class CodeCatchClauseCollection
 : public CollectionBase
/** @attribute SerializableAttribute() */ 
/** @attribute ComVisibleAttribute(true) */ 
/** @attribute ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch) */ 
public class CodeCatchClauseCollection extends
 CollectionBase
SerializableAttribute 
ComVisibleAttribute(true) 
ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch) 
public class CodeCatchClauseCollection extends
 CollectionBase
解説解説
使用例使用例
' Creates an empty CodeCatchClauseCollection.
Dim collection As New CodeCatchClauseCollection()

' Adds a CodeCatchClause to the collection.
collection.Add(New CodeCatchClause("e"))

' Adds an array of CodeCatchClause objects to the collection.
Dim clauses As CodeCatchClause() = {New CodeCatchClause(),
 New CodeCatchClause()}
collection.AddRange(clauses)

' Adds a collection of CodeCatchClause objects to the collection.
Dim clausesCollection As New
 CodeCatchClauseCollection()
clausesCollection.Add(New CodeCatchClause("e",
 New CodeTypeReference(GetType(System.ArgumentOutOfRangeException))))
clausesCollection.Add(New CodeCatchClause("e"))
collection.AddRange(clausesCollection)

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

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

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

' Inserts a CodeCatchClause at index 0 of the collection.
collection.Insert(0, New CodeCatchClause("e"))

' Removes the specified CodeCatchClause from the collection.
Dim clause As New CodeCatchClause("e")
collection.Remove(clause)

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

// Adds a CodeCatchClause to the collection.
collection.Add( new CodeCatchClause("e") );

// Adds an array of CodeCatchClause objects to the collection.
CodeCatchClause[] clauses = { new CodeCatchClause(), new
 CodeCatchClause() };
collection.AddRange( clauses );

// Adds a collection of CodeCatchClause objects to the collection.
CodeCatchClauseCollection clausesCollection = new CodeCatchClauseCollection();
clausesCollection.Add( new CodeCatchClause("e", new
 CodeTypeReference(typeof(System.ArgumentOutOfRangeException))) );
clausesCollection.Add( new CodeCatchClause("e") );
collection.AddRange( clausesCollection );

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

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

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

// Inserts a CodeCatchClause at index 0 of the collection.
collection.Insert( 0, new CodeCatchClause("e") );

// Removes the specified CodeCatchClause from the collection.
CodeCatchClause clause = new CodeCatchClause("e");
collection.Remove( clause );

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

// Adds a CodeCatchClause to the collection.
collection->Add( gcnew CodeCatchClause( "e" ) );

// Adds an array of CodeCatchClause objects to the collection.
array<CodeCatchClause^>^clauses = {gcnew CodeCatchClause,gcnew CodeCatchClause};
collection->AddRange( clauses );

// Adds a collection of CodeCatchClause objects to the collection.
CodeCatchClauseCollection^ clausesCollection = gcnew CodeCatchClauseCollection;
clausesCollection->Add( gcnew CodeCatchClause( "e",gcnew CodeTypeReference(
 System::ArgumentOutOfRangeException::typeid ) ) );
clausesCollection->Add( gcnew CodeCatchClause( "e" ) );
collection->AddRange( clausesCollection );

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

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

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

// Inserts a CodeCatchClause at index 0 of the collection.
collection->Insert( 0, gcnew CodeCatchClause( "e" ) );

// Removes the specified CodeCatchClause from the collection.
CodeCatchClause^ clause = gcnew CodeCatchClause( "e" );
collection->Remove( clause );

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

// Adds a CodeCatchClause to the collection.
collection.Add(new CodeCatchClause("e"));

// Adds an array of CodeCatchClause objects to the collection.
CodeCatchClause clauses[] =  { new CodeCatchClause(), new
 
    CodeCatchClause() };
collection.AddRange(clauses);
// Adds a collection of CodeCatchClause objects to the collection.
CodeCatchClauseCollection clausesCollection = new 
    CodeCatchClauseCollection();
clausesCollection.Add(new CodeCatchClause("e", 
    new CodeTypeReference(System.ArgumentOutOfRangeException.
    class.ToType())));
clausesCollection.Add(new CodeCatchClause("e"));
collection.AddRange(clausesCollection);

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

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

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

// Inserts a CodeCatchClause at index 0 of the collection.
collection.Insert(0, new CodeCatchClause("e"));

// Removes the specified CodeCatchClause from the collection.
CodeCatchClause clause = new CodeCatchClause("e");
collection.Remove(clause);

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



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

辞書ショートカット

すべての辞書の索引

「CodeCatchClauseCollection クラス」の関連用語

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

   

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



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

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

©2024 GRAS Group, Inc.RSS