1 / 24

C# For Programmers

C# For Programmers. Three phases of this class Basics – CLR, Types, C# Language syntax, Object Oriented Programming(OOP) concepts Applications Development – ADO.Net , ASP.Net , Windows Forms, Web Services, WPF, WCF Select Topics - A class or two that will cover selected by students topics

hilda
Télécharger la présentation

C# For Programmers

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# For Programmers • Three phases of this class • Basics – CLR, Types, C# Language syntax, Object Oriented Programming(OOP) concepts • Applications Development – ADO.Net, ASP.Net, Windows Forms, Web Services, WPF, WCF • Select Topics - A class or two that will cover selected by students topics • Intensive Course of Study – brace yourself 

  2. C# For Programmers • Instructor • Boris Zlatev • Sr. Applications Developer, TDC – The Doctors Company • MS in E-Commerce Technology, DePaul University, Chicago, 2004 • boris@zlatev.net • Course site at www.zlatev.org/csclass

  3. The .NET Framework • Extensive and powerful development platform • SDK – freely downloadable from Microsoft.com • Windows XP and Vista – .NET already embedded in the operating system • In the future – possible support by other OS – UNIX \ Linux

  4. .NET Framework – Platform Architecture

  5. .NET Framework - Design Goals • Component Infrastructure • Portable executable(PE) - DLL, EXE • Language Integration • Language independence • Internet Interoperation • Uses widely accepted standards, such as SOAP, XML, and HTTP • Simple Development

  6. .NET Framework - Design Goals • Simple Deployment • XCOPY deployment • Reliability • Reliable language • Robust runtime and infrastructure • Type safety • Automatic memory management

  7. .NET Framework - Design Goals • Security • Protects access to specific parts of the executable code • Declarative security checks (attributes) • Imperative security checks (explicit security checks)

  8. NET Framework – Building Blocks

  9. The Common Language Runtime (CLR) • The engine responsible for executing managed code. • Managed code – code written and compiled in a .NET language and compiler

  10. CLR - KeyFeatures • Cross language integration • Cross language exception handling • Automatic memory management – garbage collection • Code access security • Side – by – side execution • Easier deployment and versioning

  11. CLR – Major Components

  12. Intermediate language (IL) • Full name – Microsoft Intermediate Language (MSIL) • Non native compiled code • A sort of assembly language • Only calls to functions defined in the .NET core types and base classes • No calls to Windows API • CPU Independent - no CPU specific functions and calls

  13. Just – In – Time Compilation (JIT) • IL code is loaded by the CLR and compiled into machine code • Compilation on “as needed” basis on first call • Compiled code cached for subsequent requests • Code checked for type safety - compiler ensures that the code doesn’t try to access invalid memory addresses and that it returns and passes variables of the right type

  14. Metadata • Information about the types used and referenced by the IL code • Name of the types(classes), class members, parameters, references to other types • Advantages: • Code safety and verification • Reflection - ability to examine metadata in code • IntelliSense – Visual Studio feature

  15. Assembly • A product of compilation (IL + metadata) • Assemblies are Portable Executables (PE) - The smallest unit of code that can be executed and reused. • Made of one or more managed modules and resource files (optional), such as images • Manifest – lists all the files that the assembly is made of

  16. The format of a .NET PE file

  17. The Common Type System (CTS) • Value types • Reference types • Boxing and unboxing • Classes, properties, indexers • Interfaces • Delegates • Generics

  18. What Is A Type? • The CTS provides every language running on the .NET platform with a base set of data types (classes) • Two Categories • Value Types: Value types directly contain their data. • Reference Types: Reference types store a reference to the value's memory address

  19. The Common Type System (CTS)

  20. The Common Type System (CTS) • Types are defined by CLR, hence they are the same across languages

  21. The Common Language Specification (CLS) • A series of basic rules that are required for language integration • Spells out the minimum requirements for being a .NET language • Compiler vendors can build their compilers to the specification and provide languages that target .NET.

  22. The Framework Class Libraray (FCL) • Thousands of classes and interfaces • Encapsulate a lot of system objects and functionality that help us write: • Windows Applications (Win Forms, WPF Applications, Windows Services) • ASP.NET Applications – use server side controls • Web Services – the FCL classes hide all the underlying details of SOAP and network communications

  23. Integrated Development Environments (IDE) • Visual Studio.NET • Visual C#.NET • We will use it in this class http://www.microsoft.com/express/download/

More Related