MSTC'14 (windows 8 + windows phone) Workshops_Day 2

28
Introduction to PRESENTED BY : AMIRA GAMAL ASMAA NOUH

description

 

Transcript of MSTC'14 (windows 8 + windows phone) Workshops_Day 2

  • 1. Introduction to PRESENTED BY : AMIRA GAMAL ASMAA NOUH

2. WelcomeWindows 8Windows Phone 3. Agenda Type System Value types and Reference types Type conversions New types:(structs, enums, arrays, delegates) Object System Namespaces(packages) Inheritances Interfaces (collection) Cast Operators Attributes 4. C# Primitive Value Typeschar, float, double, int, long, shortBoolNew types: decimal, uint, ulong, ushortStructs and Enumerationsetc. 5. C# Value Sizes 6. C# Reference types Class (Non Primitive)objectStringsInterfacesArraysDelegate (method pointers) 7. Value Types vs. Reference Types Example: Does b==a after this fragment runs? No, if type is a Value Type-Yes, if type is a Reference Type 8. Conversions Implicit vs. Explicit Some conversions can be done implicitly Example:Others need an explicit cast Example: 9. Structs Like classes Methods:(Constants,Constructors,..)box or unbox to convert between structs and classes.No destructors allowed. 10. Struct Example 11. Enums(Enumerations) 12. Enums(Enumerations) 13. Arrays 14. Delegates 15. Delegates 16. Delegates 17. Delegates 18. Delegates 19. Delegates 20. Namespaces 21. Namespaces 22. Inheritance Single-Inheritance Only (like Java) 23. Access Modifiers Five Possible access Modifiers instead of four Private same as java Public - same as java Protected only this class and derived classes Internal only classes in the same assembly file Protected internal any class in the same assembly or any derived class even if its in adifferent assembly file 24. Collections Collection classes are specialized classes for data storage and retrievalMost collection classes implement the same interfaces.Many classes provided by the runtime libraries implement ICollection. (arrays, ..) System.Collections.ICollection 25. Video 26. video 27. Any Questions? 28. Contact Us: Amira Gamal [email protected] Twittwer: @Amira_gamalm FB: /amiragamalsalemAsmaa Nouh [email protected] Mob. No.: 01112644445 FB: /smsmnouh