1 / 22

Paul Stubbs MCSD, MCSE 4.0, MCP+I, MCT, MCAD .Net

C#. Paul Stubbs MCSD, MCSE 4.0, MCP+I, MCT, MCAD .Net. Agenda. Language Features Development Environment Performance Total Cost of Ownership (TCO). Hello World. using System; class Hello { static void Main() { Console.WriteLine("Hello world"); } }. VB. C++. C#. J#.

stormy
Download Presentation

Paul Stubbs MCSD, MCSE 4.0, MCP+I, MCT, MCAD .Net

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# Paul Stubbs MCSD, MCSE 4.0, MCP+I, MCT, MCAD .Net

  2. Agenda • Language Features • Development Environment • Performance • Total Cost of Ownership (TCO)

  3. Hello World using System; class Hello { static void Main() { Console.WriteLine("Hello world"); } }

  4. VB C++ C# J# … Common Language Specification ASP .NET Web Forms Web Services Mobile Internet Toolkit Windows Forms ADO .NET and XML Base Class Library .Net Framework Visual Studio .NET Common Language Runtime Operating System

  5. Design Goals • Component Oriented • Properties, methods, events • Design-time and run-time attributes • Integrated documentation using XML • No header files, IDL, etc. • Everything is an Object

  6. Design Goals • Garbage Collection • No memory leaks • Versioning • Built into the framework • Exceptions • Baked into the language and framework • Type Safe • No unsafe casts

  7. Design Goals • Multi-Platform • Win32 , Win64 • Rotor • FreeBSD • Mono • GNU/Linux , Unix, Mac OS X, Solaris • Multi-Language • Over 20 languages supported

  8. Interoperability • No need to rewrite everything • Interop with COM+, XML, SOAP, DLL and other .Net assemblies • Use .Net assemblies from COM • C++ • Pointers (in unsafe code) • Unsigned integers • Can only be run from FullyTrusted code

  9. C# only • Delegates • Provide callbacks • Eventing model • Type safe function pointers • Multicast • Asynchronous

  10. C# only • Enumerations • Group together user defined constants • Type Safe • Structs (value types) • Created on the stack • Passed by value • No need to garbage collect

  11. C# only • Foreach • Iterate through arrays, collections and classes • Consistent and concise String[] months = {“Jan”,”Feb”,”Mar”,”Apr”,”May”}; Foreach{string month in months} Console.WriteLine(“The month is “ + month);

  12. C# only • Properties • Accessed as if it were a field • Same as getter and setter pattern • Maintains relationship between get and set Foo.setSize(getSize() + 1); Label.getFont().setBold(true); Java/C++ Foo.size++; Label.font.bold = true; C#

  13. C# only • Preprocessor Directives • Runtime code generation • Pass by reference • Variable length parameter lists • Explicit Interface Implementation

  14. Development Tools • Visual Studio .Net • Rich Client development • Web Client development • Mobile Client (WAP) development • Windows CE (PocketPC) development • Office 11 (soon) development • XML/XSL development • Integrated Source Control

  15. Visual Studio .NET

  16. Performance / Pet Shop

  17. Maintainability / Pet Shop

  18. Affordability • Windows on Intel delivers more bang for the buck than the Mainframe or UNIX-based servers • Visual Studio .NET • Less code • End to End Debugging • XCOPY deployment • Integrate existing code • Use existing developers skills

  19. Summary • C# and Java are very similar • Power of C++ simplicity of VB • C# is a standard • ECMA-334 C#, ECMA-335 CLI, ISO • Robust Development Environment • High Performance • Lower cost

  20. Links • MaineBytes .Net User Group • http://www.MaineBytes.com • Pet Shop benchmark test • http://www.middleware-company.com/j2eedotnetbench/ • Comparison of C# and Java • http://www.25hoursaday.com/CsharpVsJava.html (80 page white paper)

  21. Links • Mono • http://www.go-mono.com • Rotor • http://www.corel.com/ssclii/

More Related