1 / 14

C Soup To Nuts: Arrays and Collections

What We Will Cover. ArraysCreating an arrayArray typesSingle-dimensionalTwo-dimensionalMultidimensionalJaggedCollection classesforeach statementGeneric lists. Arrays. Similar to other languagesZero-based[] After type (not name)Simple example (array of integers):int[] names;. Demonstr

don
Télécharger la présentation

C Soup To Nuts: Arrays and Collections

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


    1. C# Soup To Nuts: Arrays and Collections William J. Steele MSDN Developer Evangelist Microsoft Corporation http://blogs.msdn.com/wsteele

    2. What We Will Cover Arrays Creating an array Array types Single-dimensional Two-dimensional Multidimensional Jagged Collection classes foreach statement Generic lists

    3. Arrays Similar to other languages Zero-based [] After type (not name) Simple example (array of integers): int[] names;

    4. Demonstration One Creating and Using Arrays

    5. Countless Dimensions Single-dimensional type[] name; Two-dimensional type[,] name; Multidimensional type[,,] name; Jagged (array of arrays) type[][] name;

    6. Demonstration Two Multidimensional Arrays

    7. Collection Classes System.Collections ArrayList and List Variable size arrays Always single-dimensional .Add method Advanced functionality Implements IList interface Sorting Comparing

    8. Demonstration Three Collection Classes

    9. Generic Collection Classes System.Collections.Generic Just like collections, except: Strongly typed Implements IList generic interface Sometimes faster Read as list of <Type> Example: List<int> = new List<int>();

    10. Demonstration Four Generic Lists

    11. Summary Arrays Creating an array Array types Single-dimensional Two-dimensional Multidimensional Jagged Collection classes foreach statement Generic lists

    12. Next Week: Creating and Manipulating Strings Microsoft Visual C# .NET is the newest programming language from Microsoft. So far in this series, we've been exploring the basics of C# and Microsoft Visual C# 2005 Express Edition. In this webcast, we will learn about strings, and we will see how to create and manipulate them using basic operators, in addition to the StringBuilder class.

    13. Thank You! My contact information: William J. Steele wsteele@microsoft.com http://blogs.msdn.com/wsteele My manager is Melanie Brunner Send feedback to mbrunne@microsoft.com

    14. Questions and Answers Submit text questions using the Ask button. Dont forget to fill out the survey. For upcoming and previously live webcasts: www.microsoft.com/webcasts Got webcast content ideas? Contact us at: http://go.microsoft.com/fwlink/?LinkId=41781 Today's webcast was presented using Microsoft Office Live Meeting. Get a free 14-day trial by visiting: www.microsoft.com/presentlive

More Related