Platforms and tools for Web Services and Mobile Applications Introduction to C# Bent Thomsen Aalborg University 3rd and 4th of June 2004.

Slides:



Advertisements
Similar presentations
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 12 Introduction to ASP.NET.
Advertisements

Unit 1: Overview of the Microsoft.NET Platform
Introduction to .NET Framework
.NET Framework Overview
History of.Net Introduced by Microsoft Earlier technology was VC++ and VB VC++ comes with so many library and VB was so easy to use and not flexible to.
INSTRUCTOR: DR MARCO VALTORTA CSCE 330 C# GROUP MEMBERS: KONSTANTINOS MALEGOS YASSER AL-MUTAIRY CHRIS HESTER UNIVERSITY OF SOUTH CAROLINA.
C#/.NET Jacob Lewallen. C# vs.NET.NET is a platform. Many languages compile to.NET: –VB.NET –Python.NET –Managed C++ –C#
Introducing the Common Language Runtime for.NET. The Common Language Runtime The Common Language Runtime (CLR) The Common Language Runtime (CLR) –Execution.
Intro to C# Language Richard Della Tezra IS 373. What Is C#? C# is type-safe object-oriented language Enables developers to build a variety of secure.
Creating and Running Your First C# Program Svetlin Nakov Telerik Corporation
Peter Juszczyk CS 492/493 - ISGS. // Is this C# or Java? class TestApp { static void Main() { int counter = 0; counter++; } } The answer is C# - In C#
Intro to dot Net Dr. John Abraham UTPA – Fall 09 CSCI 3327.
A Free sample background from © 2001 By Default!Slide 1.NET Overview BY: Pinkesh Desai.
Overview of Microsoft.Net and Vb.Net ITSE 2349 Spring 2002 Material from Microsoft.Net an Overview for ACC faculty by Stuart Laughton and Introduction.
1 Introduction to.NET Framework. 2.NETFramework Internet COM+ Orchestration Orchestration Windows.NET Enterprise ServersBuildingBlockServices Visual Studio.NET.
Introduction to .Net Framework
Architecture of.NET Framework .NET Framework ٭ Microsoft.NET (pronounced “dot net”) is a software component that runs on the Windows operating.
 2002 Prentice Hall. All rights reserved. 1 Introduction to Visual Basic.NET,.NET Framework and Visual Studio.NET Outline 1.7Introduction to Visual Basic.NET.
.NET Overview. 2 Objectives Introduce.NET –overview –languages –libraries –development and execution model Examine simple C# program.
Meir Botner David Ben-David. Project Goal Build a messenger that allows a customer to communicate with a service provider for a fee.
11 Getting Started with C# Chapter Objectives You will be able to: 1. Say in general terms how C# differs from C. 2. Create, compile, and run a.
Introduction to.NET Framework. .NET – What Is It? Software platform Language neutral In other words:.NET is not a language (Runtime and a library for.
Microsoft.NET Vs Sun JAVA
Introduction to .NET Framework
Lecture Set 1 Part B: Understanding Visual Studio and.NET – Structure and Terminology 1/16/ :04 PM.
Creating and Running Your First C# Program Svetlin Nakov Telerik Corporation
Compiling and Executing Code in.Net Microsoft Intermediate Language and Common Language Runtime.
.NET Framework Overview
Introduction .NET Framework
C# Overview and Features. Content I.History of C# II.Architecture III.How to install IV.Features V.Code Sample VI.Microsoft.NET Platform VII.Why use C#
Computing with C# and the.NET Framework Chapter 1 An Introduction to Computing with C# ©2003, 2011 Art Gittleman.
MESDA Conference 2002 MESDA Annual Conference 2002 Software Development Track Java vs. C#
Distributed Systems (236351) Tutorial 1 - Getting Started with Visual Studio C#.NET.
Managed C++. Objectives Overview to Visual C++.NET Concepts and architecture Developing with Managed Extensions for C++ Use cases Managed C++, Visual.
.NET Language Supports. .NET Language Support Operating System Common Language Runtime Base Class Library ADO.NET and XML ASP.NET Web Forms Web Services.
Component-Based Software Engineering Introduction to.NET Paul Krause.
.NET Framework Danish Sami UG Lead.NetFoundry
Programming in C#. I. Introduction C# (or C-Sharp) is a programming language. C# is used to write software that runs on the.NET Framework. Although C#
Introduction to C# C# is - elegant, type-safe, object oriented language enabling to build applications that run on the.NET framework - types of applications.
Programming Handheld and Mobile devices 1 Programming of Handheld and Mobile Devices Lecture 17 Microsoft’s Approach 1 –.NET Mobile Framework Rob Pooley.
Applied Computing Technology Laboratory QuickStart C# Learning to Program in C# Amy Roberge & John Linehan November 7, 2005.
C# Versus Java Author: Eaddy, Marc Source: Software Tools for the Professional Programmer. Dr. Dobb's Journal. Feb2001, Vol. 26 Issue 2, p74 Hong Lu CS699A.
Rajiv and Shipra Introduction to.NET (asp.net,c#,vb)
tom perkins1 XML Web Services -.NET FRAMEWORK – Part 1 CHAPTER 1.1 – 1.3.
Module 1: Getting Started. Introduction to.NET and the.NET Framework Exploring Visual Studio.NET Creating a Windows Application Project Overview Use Visual.
Module 3: Using Microsoft.NET- Based Languages. Overview Overview of the.NET-Based Languages Comparison of the.NET-Based Languages.
Intro to dot Net Dr. John Abraham UTPA CSCI 3327.
PRIOR TO WEB SERVICES THE OTHER TECHNOLOGIES ARE:.
Bill Campbell, UMB Microsoft's.NET C# and The Common Language Runtime.
Object Oriented Software Development 4. C# data types, objects and references.
Common Language Runtime Introduction  The common language runtime is one of the most essential component of the.Net Framework.  It acts.
A comparison of C-Sharp and Java Zunaid Jogee Supervisor: T. Stakemire.
INTRODUCTION CHAPTER #1 Visual Basic.NET. VB.Net General features It is an object oriented language  In the past VB had objects but focus was not placed.
Introduction to C# Programming with Microsoft.NET AY
Text Introduction to.NET Framework. CONFIDENTIAL Agenda .NET Training – Purpose  What is.NET?  Why.NET?  Advantages  Architecture  Components: CLR,
Java and C# - Some Commonalities Compile into machine-independent, language- independent code which runs in a managed execution environment Garbage Collection.
A Detailed Introduction To Visual Studio.NET CRB Tech ReviewsCRB Tech Reviews introduces you to the world of Visual.
INTRODUCTION BEGINNING C#. C# AND THE.NET RUNTIME AND LIBRARIES The C# compiler compiles and convert C# programs. NET Common Language Runtime (CLR) executes.
Intro to ASP.NET CS-422 Dick Steflik. What is.NET As applications in the Enterprise become more and more netcentric and less and less standalone.NET is.
Introduction to the Microsoft.NET Framework Chris Wastchak Student Ambassador to Microsoft.
Introduction to .NET framework
The 100% Inspiration Tour.
C# and the .NET Framework
CE-105 Spring 2007 Engr. Faisal ur Rehman
CS360 Windows Programming
Module 0: Introduction Chapter 2: Getting Started
Module 1: Getting Started
Introduction to C# AKEEL AHMED.
.Net Framework Details Imran Rashid CTO at ManiWeber Technologies.
Paul Stubbs MCSD, MCSE 4.0, MCP+I, MCT, MCAD .Net
Presentation transcript:

Platforms and tools for Web Services and Mobile Applications Introduction to C# Bent Thomsen Aalborg University 3rd and 4th of June 2004

Introduction to C# What is C# Java like language from Microsoft Object Orientated Language Derived from C++ Has the power of C++ and the simplicity of Visual Basic Part of Microsoft.NET framework If you are serious about.Net you need to learn C#

Introduction to C# Can only run on Windows OS Cross Language Able to use objects created in C++.NET and Visual Basic.NET and all the other.NET Languages (or not) Cross Platform What is C# (con’t)

Introduction to C# What do you need? –Windows OS Machine. Windows 2000, XP or 2003 –Microsoft.NET SDK –Text Editor Save files with a.cs extension Getting started with C#

Introduction to C# What about a development environment? –Visual C++ from Visual Studio 6.0 Requires registry tweaking –Visual Studio.NET –3 rd Party software Emacs and XEmacs Borland Getting started with C# (con’t)

C# vs. The World Compilation Process CPU code csc JIT.cs Source Code.exe.dll Microsoft Intermediate Language (MSIL) CLS Compliant Languages How does C# work?

C# vs. The World Common Language Runtime (CLR) –Provides an execution engine for developers code Code management (loading and execution) Memory management Garbage Collection Verification of type safety Enforcement of code access security Interoperation between managed code, COM objects, and pre-existing DLLs How does C# work? (con’t)

C# vs. The World Hello world using System; class HelloWorld { public static void Main() { Console.WriteLine(“Hello World!"); } >csc HelloWorld.cs >Hello World! The Language (con’t)

C# vs. The World Properties public class button { private string caption; public string Caption { get { return caption; } set { if (value != null) caption = value; } button b = new button(); b.Caption = “abc” string s = b.Caption; The Language (con’t)

C# vs. The World Parameter Passing The Language (con’t) By Value public static void Swap(ref int x, ref int y) { int z = x; x = y; y = z; } By Reference

C# vs. The World Pointers –Not recommended for use public struct Node { public int value; public unsafe Node* next; } The Language (con’t) public unsafe class A {... public class A { public unsafe void B (char *p) {...

C# vs. The World The Language (con’t) Boxing / Unboxing –Allows value types to be converted to and from objects automatically ArrayList list = new ArrayList(); int z = 100; list.Add(1); list.Add(13.12); list.Add(z); //integers are automatically boxed //when they are added to the list

C# vs. The World The Language (con’t) Delegates –Basically a type-safe object orientated function pointer delegate void simpleDelegate(); Class Test { static void F() { System.Console.Writeline(“Test.F”); } static void main (){ simpleDelegate d = new simpleDelegate(F); d(); }

C# vs. The World The Language (con’t) Delegates (con’t) void multiCall (simpleDelegate d, int count) { for (int i=0; i<count; i++){ d(); }

C# vs. The World The Language (con’t) Versioning Class B y(); Class A x(); v.1 Class A x(); y(); v.2 Class B y(); Which one to use?

C# vs. The World Versioning –C# requires developers to clearly state their intent Use of the keyword ‘new’ and ‘override’ Class Derived B { new public void x () {... Class Derived B { public override void x () {... The Language (con’t)

C# vs. The World Libraries The Language (con’t) Few core libraries Uses the libraries from the.NET framework Threading, Collection, XML, ADO+, ASP+, GDI+ & WinForms libraries

C# vs. The World Comparison of C# syntax with Java and C++ Similarities Single rooted class hierarchy Similar keywords (derived from C++) Virtual Machine & IL/CLR Garbage Collection No global methods Interface, no Multiple inheritance Exception handling

C# vs. The World Comparison of C# syntax with Java and C++ Differences Syntax and Keywords not from C++ Properties, Delegates, Boxing, Pointers, Libraries, etc. Preprocessor Directives

C# vs. The World Easy to learn, similar to both C++ and JAVA Can use existing pool of C++ and Visual Basic programmers. Can use components from.NET Syntactical Sugar C# Advantages

C# vs. The World Only runs on Windows machines Limited choice in development environment Locked into Microsoft compatibility Not extensively tested Not enough maturity time C# Disadvantages