C Presentation2

download C Presentation2

of 15

Transcript of C Presentation2

  • 7/30/2019 C Presentation2

    1/15

    C# Overview and

    Features

  • 7/30/2019 C Presentation2

    2/15

    Content

    I. History of C#

    II. Architecture

    III. How to install

    IV. Features

    V. Code Sample

    VI. Microsoft .NET Platform

    VII. Why use C#

    VIII.Conlusion

  • 7/30/2019 C Presentation2

    3/15

    What is C#?

    C# ( pronounced as C-sharp ) is a new Java likelanguage from Microsoft. Microsoft says thatC# is a language with the power of C++ andsimplicity of Visual Basic. C# supposed to be

    the best language for Microsoft's .NET

    programming.

  • 7/30/2019 C Presentation2

    4/15

    History

    In August, 2000, Microsoft, Hewlett-Packard and Intelco-sponsored the submission of specifications for theCommon Language Infrastructure (CLI) and C#programming language to the internationalstandardization organization ECMA

    During next year the specifications were formulatedinto standards.

    In December, 2001, the ECMA General Assemblyratified the 1st edition of the C# and CLI standards asECMA-334 and ECMA-335

  • 7/30/2019 C Presentation2

    5/15

    History II

    In April, 2003, ISO ratified the standards

    Work at ECMA on the next edition of theStandards is already underway

  • 7/30/2019 C Presentation2

    6/15

    Architecture

    Common Language Runtime manages code execution

    provides services

    Compiler C# compiler is part of .NET Framework SDK

    generatesMSIL + Metadata CPU specific Code (JIT)

    Because the runtime supplies one or more JIT

    compilers for each computer architecture it supports,the same set of MSIL can be JIT-compiled andexecuted on any supported architecture

  • 7/30/2019 C Presentation2

    7/15

    How to install

    Install Windows 2000 and IE 5.5.

    Install Microsoft .NET Framework SDK.Microsoft has it on MSDN site.

    After installing these you can write your code inany text editor and save it as .cs extension.

    To run the program use the csc command likecsc c:\myprogram.cs

  • 7/30/2019 C Presentation2

    8/15

    Features

    Garbage collection relieves the programmer ofthe burden of manual memory management.

    Variables in C# are automatically initialized by

    the environment. Managed execution environment

    Variables are type-safe.

    native support for the Component ObjectModel (COM) and Windows-based APIs.

    Built in versioning

  • 7/30/2019 C Presentation2

    9/15

    Features II

    Restricted use of native pointers

    With C#, every object is automatically a COMobject

    Platform and language independent

    Inside a specially marked code block, developers

    are allowed to use pointers and traditionalC/C++ features such as manually managedmemory and pointer arithmetic.

  • 7/30/2019 C Presentation2

    10/15

    Features III

    Compiler allows use of initialised Variables only

    Strong exception handling

    Full XML support Suited well for building Web Services

    Array bounds checking

    The language is intended for use in developingsoftware components suitable for deployment indistributed environments.

  • 7/30/2019 C Presentation2

    11/15

  • 7/30/2019 C Presentation2

    12/15

  • 7/30/2019 C Presentation2

    13/15

    Microsoft .NET Platform

    Huge library of Functions

    Collection of classes

    Windows Application FrameworkWeb Framework for ASP.NET

    Provides access to many kinds of Devices

    Developed mainly in C# itself

  • 7/30/2019 C Presentation2

    14/15

    Why use C#

    Full COM/Platform support for existing code integration.

    Robustness through garbage collection and type safety.

    Security provided through intrinsic code trust mechanisms.

    Full support of extensible metadata concepts.

    You can also interoperate with other languages, across platforms,with legacy data, by virtue of the following features:

    Full interoperability support through COM+ 1.0 and .NETFramework services.

    XML support for Web-based component interaction. Versioning to provide ease of administration and deployment.

  • 7/30/2019 C Presentation2

    15/15

    Conclusion

    C# is a modern, object-oriented language thatenables programmers build solutions for theMicrosoft .NET platform. The framework

    provided allows C# components to becomeXML Web services that are available across theInternet, from any application running on any

    platform.