Finalize 14 outline introduction system namespace

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: nalization(this); } // Free your own state (NOT other state you hold) and // give your parent a chance to finalize ~ ResourceWrapper() { freeState(); Base.Finalize(); } 14 Outline Introduction System Namespace Collection Classes I/O and Networking Threading and Synchronization Transactions Exceptions Collection Classes Arrays Collection Interfaces The Collection Classes 15 Collection Classes Arrays The only collection outside Collections namespace System.Array class Mapped to language-intrinsic arrays Polymorphic, stores System.Object elements Arbitrary number of dimensions, lengths Specified at creation time (CreateInstance) After construction, array dimensions are fixed Supports sorting Self-comparing IComparable objects External comparisons with IComparer Supports binary searches on sorted arrays Collection Classes Arrays Example public static void Main() { // Create and initialize a new int array and a new Object array. int myIntArray = new int[5] { 1, 2, 3, 4, 5 }; Object myObjArray = new Object[5] { 26, 27, 28, 29, 30 }; // Copy the f...
View Full Document

Ask a homework question - tutors are online