Introduction to .NET with C# @ university of wayamba
The choice of real engineers…Prepared & Presented by :- Prageeth Sandakalum, Microsoft Student Champ
Microsoft .NET Framework What is a “framework” An overview of the .NET Virtual Machine Inside the .NET framework .NET framework language support .NET framework class library C# Language Vs Java Completely new features in C# Before you begin Writing the first C# code Visual Studio Fun…
C# .NET Language Access modifiers, Conditions, Loops Object Oriented Programming in C# Classes and Objects Inheritance Polymorphism Encapsulation Value Types Vs Reference Type C# special language features Enumerations, Nullable Types, Partial Classes, Operator Overloading Windows Forms
.NET ??We have many. Why another 1? .NET Framework (3.5) All in 1 solution for a programmer…
A framework a set of ideas, principles, agreements, or rules thatprovides the basis or outline for something intended to be morefully developed at a later stage - MSN Encarta -A software framework is a re-usable design for a softwaresystem (or subsystem).A software framework may include support programs, codelibraries, a scripting language, or other software to help developand glue together the different components of a softwareproject. - Wikipedia -
Language neutral. many languages with a common class library Provides a runtime and a set of common libraries for writing and executing written programs in any compliant language. The runtime is called the .NET CLR (Common Language Runtime) – similar to the Java Runtime. CLR Provides the functionality to Activate objects, perform security Checks, Memory Allocation, Execution, etc…
VB C++ C# J# … Secure, integrated class libraries Common Language Specification Unifies programming models across languages Visual Studio .NET ASP .NET WindowsWeb Forms Web Services Enables cross-language Forms Mobile Internet Toolkit integration ADO .NET and XML Factored for extensibility Base Class Library Designed for tools Create frameworks on top Common Language Runtime of the high level .NET framework Operating SystemASP.NET Common Language Runtime High-productivity environment Executes code, maintains for building and running security, handles component Web services “plumbing” and dependencies
Common Language Specification. First class support for all CLS compliant languages. Microsoft provided languages. Visual Basic®, C#, C++, J#, JScript®. 3rd-party provided languages APL, Cobol, Component Pascal, Eiffel, Fortran, Haskell, Mercury, Oberon, Oz, Perl, Python, RPG, Scheme, Smalltalk, Standard ML, Ruby, Delphi and the list is growing!
Spans All Programming Languages. Enables cross-language inheritance and debugging. Integrates well with tools.Is Object-Oriented and Consistent. Enhances developer productivity by reducing the number of APIs to learn.Has a Built-In Common Type System.Is Extensible. Makes it easy to add or modify framework features.Is Secure. Allows creation of secure applications.
As in Java Object-Orientation with single inheritance Interfaces Exceptions Threads Packaging Garbage Collection Reflection Dynamic loading of code …
References and output parameters Objects on the stack (structs) Attributes Indexers Partial Types Loosely Typed Variables Enumerations Operator Overloading Nullable types Lambda Expressions …
Dynamic Link Libraries Adding references Adding Projects Structuring the Code Using the .DLLs Namespaces Adding files to the projects Aliases Adding arguments Console.Read()
Let’s start Codingand take a tour inVisual Studio..!
C#.NET Language FeaturesThe Finest roadmap in application development
Write a program to create an Animal super class and create aCat, Dog classes which extends it… Use properties toinitialize the number of legs each animal has.Write a program to test the ref variable and the paramskeyword
Structs Value type representation of classes Ideal for Light weight objects or heavily used objects Polygon, Rectangle classes Fraction class in a mathematical projectEnumerationsNullable TypesPartial ClassesOperator Overloading
Create a struct for complex numbers.. Use operatoroverloading to implement the multiplication
Let’s create a simple WindowsBased Client Application inC#.NET using Visual Studio..!
Thank You !!!Contact me for further clarification Prageeth Sandakalum Prageeth.email@example.com