HttpStaticObjectsCollection.CopyTo メソッド
アセンブリ: System.Web (system.web.dll 内)

Dim instance As HttpStaticObjectsCollection Dim array As Array Dim index As Integer instance.CopyTo(array, index)

必要なサイズの新しい Object 配列を作成し、既存の StaticObjects コレクションをその配列へコピーする例を次に示します。
' Find the number of members in the StaticObjects collection. Dim ObjCount As Integer = Application.StaticObjects.Count ' Create an array of the same size. Dim MyObjArray(ObjCount) As Object ' Copy the entire collection into the array. Application.StaticObjects.CopyTo(MyObjArray, 0)
// Find the number of members in the StaticObjects collection. int ObjCount = Application.StaticObjects.Count; // Create an array of the same size. Object[] MyObjArray = new Object[ObjCount]; // Copy the entire collection into the array. Application.StaticObjects.CopyTo(MyObjArray, 0);
// Find the number of members in the StaticObjects collection. int objCount = get_Application().get_StaticObjects().get_Count(); // Create an array of the same size. Array myObjArray = Array.CreateInstance(Type.GetType("System.Object"), objCount); // Copy the entire collection into the array. get_Application().get_StaticObjects().CopyTo(myObjArray,0);
// Find the number of members in the StaticObjects collection. var objCount : int = Application.StaticObjects.Count // Create an array of the same size. var myObjArray : System.Array = System.Array.CreateInstance(System.Object, objCount) // Copy the entire collection into the array. Application.StaticObjects.CopyTo(myObjArray, 0)

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- HttpStaticObjectsCollection.CopyTo メソッドのページへのリンク