Visual C++ .NET is smiling to you, please return her smile

The C++ Programming Tutorials: C++ Arrays and Collection Classes







This module is concerned with data structures. You’ll learn about arrays and other collection classes, and you’ll learn how to use them in your programs. In the first part of the module, you’re going to learn about two sorts of arrays - the native arrays provided by the C++ language and the .NET managed arrays, which use functionality inherited from the .NET  Framework. You’ll find out how they all work and when one should be used rather than the other. The second part of the module looks more widely at the range of collection classes provided by the .NET Framework, discussing their characteristics and showing you how and when to use them.

Native arrays are those provided as part of the C++ language. They’re based on the arrays that C++ inherits from C. Although native arrays are designed to be fast and efficient, there are drawbacks associated with using them. Because reference types are always accessed using references, creating and initializing arrays of reference types is slightly different from creating arrays of value types. You will also try the multi dimensional array. The multi dimensional array uses the same syntax as one dimensional array by setting the optional dimension parameter. Managed arrays in the .NET Framework all inherit from System::Array, which means that every managed array has a number of useful properties and methods. Array class provides methods for creating, manipulating, searching, and sorting arrays, thereby serving as the base class for all arrays in the common language runtime. The System::Collections and System::Collections::Specialized namespaces contain a number of very useful collection classes that can be used in C++ programs. the following are the topics in this Chapter.

  1. Native C++ Array 1: Intro and Native C++ Arrays

  2. Native C++ Array 2: Passing Arrays to Functions, How Do Native Arrays Work?, Initializing Arrays and Multidimensional Arrays

  3. Native C++ Array 3: Dynamic Allocation and Arrays, Problems with Manual Memory Management, Managed Extension for C++ - __gc Arrays, The Old Syntax, Using the __gc and __nogc Keywords, Managed Array (array) and The Old Syntax vs the new Syntax (The Managed Extension for C++ vs New C++ Syntax)



  5. Managed C++ Array: Arrays and Reference Types

  6. .NET Array Class 1: Multidimensional Managed Arrays and Creating Arrays of Managed Arrays

  7. .NET Array Class 2: The .NET Array Class and Array Members

  8. .NET Array Class 3: Array.AsReadOnly Generic Method Example, Array.BinarySearch Method Example, Array.BinarySearch Method (Array, Object) Example

  9. Other .NET Collection Class 1: Array.BinarySearch Method (Array, Object) Example (continue)

  10. Other .NET Collection Class 2: Other .NET Collection Classes, The ArrayList Class and Other ArrayList Operations

  11. Other .NET Collection Class 3: Other ArrayList Operations (continue) and The SortedList Class

  12. Other .NET Collection Class 4: Other SortedList Operations

  13. Other .NET Collection Class 5: The StringCollection Class and Supplementary Notes - ^ (Handle to Object on Managed Heap), gcnew, for each and in

  14. Other .NET Collection Class 6: The StringCollection Class (continue) and Supplementary Notes - ^ (Handle to Object on Managed Heap)

  15. Other .NET Collection Class 7: ^ (Handle to Object on Managed Heap) - continue, gcnew, for each and in




Best viewed using FireFox, Chrome etc. Worst viewed using IE of any version


Webmaster contact: [contact[@]]

Copyright 2019 © Visualcplusdotnet. All rights reserved.

Excellent hosting services provided by MochaHost - The Online Central



| About | Disclaimer | Privacy | Site Index & Project Download | Native C | Contact |



Custom Search