INSTRUCTOR: DR MARCO VALTORTA CSCE 330 C# GROUP MEMBERS: KONSTANTINOS MALEGOS YASSER AL-MUTAIRY CHRIS HESTER UNIVERSITY OF SOUTH CAROLINA.

Slides:



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

Introduction to .NET Framework
Süsteemprogrammeerimine C# keeles (Microsoft.NET,.NET Framework 2.0) Vladimir Kjahrenov.
Microsoft.Net Technology Sachin Shetty Vimal Amin Thomas Mullasaril Vinutna Pulavarti Software Engineering CS616 Instructor:Dr.Tappert.
Web Development Using ASP.NET CA – 240 Kashif Jalal Welcome to week – 1.1 of…
C# Amy Broom Hossam Ragaban Randal Rollings Fall 2003.
Introduction to the C# Programming Language for the VB Programmer.
History  We first begin with Java which was released in 1995 by Sun Microsystems  Initially Java was 100% interpreted at runtime and was very slow 
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Introducing the Common Language Runtime. The Common Language Runtime The Common Language Runtime (CLR) The Common Language Runtime (CLR) –Execution engine.
1 An Introduction to Visual Basic Objectives Explain the history of programming languages Define the terminology used in object-oriented programming.
Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department.
Creating and Running Your First C# Program Svetlin Nakov Telerik Corporation
DotNET A Developer’s Perspective Mike Litzkow University of Wisconsin - MadisonOne.
Tahir Nawaz Visual Programming C# Week 2. What is C#? C# (pronounced "C sharp") is an object- oriented language that is used to build applications for.
Platforms and tools for Web Services and Mobile Applications Introduction to C# Bent Thomsen Aalborg University 3rd and 4th of June 2004.
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.
1 Chapter One A First Program Using C#. 2 Objectives Learn about programming tasks Learn object-oriented programming concepts Learn about the C# programming.
A First Program Using C#
CSCI 3327 Visual Basic Chapter 1: Introduction to Visual Basic
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
Introduction to .Net Framework
1 8/29/05CS360 Windows Programming Professor Shereen Khoja.
Architecture of.NET Framework .NET Framework ٭ Microsoft.NET (pronounced “dot net”) is a software component that runs on the Windows operating.
Module 1: Introduction to C# Module 2: Variables and Data Types
Session 1 - Introduction and Data Access Layer
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.
Microsoft Visual Basic 2005: Reloaded Second Edition
Introduction to .NET Rui Ye.
Creating and Running Your First C# Program Svetlin Nakov Telerik Corporation
ASP.NET  ASP.NET is a web development platform, which provides a programming model, a comprehensive software infrastructure and various services required.
Compiling and Executing Code in.Net Microsoft Intermediate Language and Common Language Runtime.
An intro to programming. The purpose of writing a program is to solve a problem or take advantage of an opportunity Consists of multiple steps:  Understanding.
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#
Lecture 1 Programming in C# Introducing C# Writing a C# Program.
Computing with C# and the.NET Framework Chapter 1 An Introduction to Computing with C# ©2003, 2011 Art Gittleman.
C# Programming Fundamentals of Object-Oriented Programming Fundamentals of Object-Oriented Programming Introducing Microsoft.NET Introducing Microsoft.NET.
ISYS 573 Special Topic – VB.Net David Chao. The History of VB Early 1960s:BASIC-Beginner’s All-Purpose Symbolic Instruction Code –Teaching –Simple syntax,
Programming for Beginners Martin Nelson Elizabeth FitzGerald Lecture 13: An Introduction to C++
.NET Language Supports. .NET Language Support Operating System Common Language Runtime Base Class Library ADO.NET and XML ASP.NET Web Forms Web Services.
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#
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)
Introducing ASP.NET 2.0. Internet Technologies WWW Architecture Web Server Client Server Request Response Network HTTP TCP/IP PC/Mac/Unix + Browser (IE,
1 Visual Studio.NET.NET as a Teaching Tool John D. Haney John M. Lovely Northern Arizona University College of Business Administration.
C# EMILEE KING. HISTORY OF C# In the late 1990’s Microsoft recognized the need to be able to develop applications that can run on multiple operating system.
PRIOR TO WEB SERVICES THE OTHER TECHNOLOGIES ARE:.
Microsoft .NET A platform that can be used for building and running windows and web applications such that the software is platform and device-independent.
BIL527 – Bilgisayar Programlama I Introduction 1.
Getting Started with.NET Getting Started with.NET/Lesson 1/Slide 1 of 31 Objectives In this lesson, you will learn to: *Identify the components of the.NET.
Object Oriented Software Development 4. C# data types, objects and references.
A comparison of C-Sharp and Java Zunaid Jogee Supervisor: T. Stakemire.
Introduction to C# Programming with Microsoft.NET AY
C# Fundamentals An Introduction. Before we begin How to get started writing C# – Quick tour of the dev. Environment – The current C# version is 5.0 –
Programming Languages Concepts Chapter 1: Programming Languages Concepts Lecture # 4.
Java and C# - Some Commonalities Compile into machine-independent, language- independent code which runs in a managed execution environment Garbage Collection.
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.
C# and the .NET Framework
Introduction to .NET Framework Ch2 – Deitel’s Book
Introduction Enosis Learning.
CMPE419 Mobile Application Development
CS360 Windows Programming
Introduction to C# AKEEL AHMED.
Introduction Enosis Learning.
CMPE419 Mobile Application Development
Presentation transcript:

INSTRUCTOR: DR MARCO VALTORTA CSCE 330 C# GROUP MEMBERS: KONSTANTINOS MALEGOS YASSER AL-MUTAIRY CHRIS HESTER UNIVERSITY OF SOUTH CAROLINA

THE BIRTH OF C# C# parents are C++ and JAVA. So, C# contains many C++ features but also adds the object-oriented features from JAVA. C# is the a hybrid language developed by Microsoft. In order to understand the basic features of the language, we must compare them with its predecessors.

INTERESTING CONCEPTS To produce the first component oriented language in the C/C++ family. You can construct components that have properties, methods and events. To create a language which everything is an object. C# bridges the gap between primitive types and classes by allowing any piece of data to be treated as object.

MICROSOFT.NET MICROSOFT.NET is the new programming environment introduced by Microsoft. It is the new way of building and deploying software that leverages standards such as HTTP and XML to make interoperability a reality. It is not necessary for C# to use this environment but C# was especially design for this environment.

Common Language Runtime The CLR serves as an execution engine for applications. Every byte of code that you write for the framework runs in the CLR. CLR consists of instructions written in CIL(common intermediate language-pseudo- machine language). CIL instructions are just-in- time and compiled into native machine code at run time. A given method is compiled only once-the first time is called-and thereafter cached in memory so it can be executed again without delay.

COMMON CIL INSTUCTIONS LDC-Loads a numeric constant onto the stack LDELEM-Loads an array element onto the stack NEWARR-Creates a new array NEWOBJ-Creates a new object THROW-Throws an exception

COMPILERS Microsoft provides CIL compilers for Java, C++, Visual Basic, Cobol, Python, Eiffel and Jscript.You can even use the assembler ILASM to write code in CIL. All of these languages use the same API so you can port an application from Visual Basic and C++ to C#. Because high level code ultimately compiles to CIL, the framework lets you write a class in one language and use it or derive it from another. That is language independence!!!

C#API The new.NET framework class library is a library with 7000 types,classes, structs, interfaces, enumerations. The bad news is that is like learning a new operating system. The good news is that that every languages uses the same API so you can easily switch to VB or C++.

SAMPLE NAMESPACES System: core data types and auxiliary classes. System.Net: classes that wrap protocols such as HTTP. System.Web.Services: classes for writing Web Services. System.Web.UI: core ASP.NET classes System.Xml: classes for reading and writing XML data.

CONTINUE… To enable construction of robust and durable software. C# includes garbage collection,structured exception handling and type safety. It allows the use of pointers through the unsafe mode where performance is the key issue. Supports web programming through ASP and XML.

CONTINUE… C# code can be written in any text editor. The only required task is to download the compiler from the Microsoft’s Website. It is recommended to use the graphical environment Visual Studio.NET. The advantages are that you can incorporate code from other languages like C++ and C and change it into C# code.

EXAMPLES OF USAGE using System ; //Import the WinForms Namespace using System.Windows.Forms ; //Class Form1 extends class Form from the //System.Windows.Forms namespace public class Form1 : Form { //Main Method public static void Main() { //Run the Application Application.Run(new Form1()); } }

RESULT

THE HELLO PROGRAM class HelloWorld { public static void Main() { System.Console.WriteLine("Hello World") ; } } Output will be Hello World

WRITE TO A FILE public class Writetextfile { public static void Main(string[] args) { FileInfo t = new FileInfo(“example.txt"); StreamWriter Tex =t.CreateText(); Tex.WriteLine(“I am writing to the file"); Tex.Write(Tex.NewLine); Tex.close(); } }

SIMILARITIES AND DIFFERNCES DECLARING VARIABLES : C#: int x; int x=3; C++: int x; int x=3; Java: int x; int x=3; ASSIGNMENTS C#: xvalue=7; C++: xvalue=7; Java: xvalue=7;

CONTINUE… FOR LOOPS C#: for(int i =1; i<=10; i++) Console.WriteLine(“ The number is {0}”, i); C++: for(int i =1; i<=10; i++) Printf(“%d\n”,i); JAVA: for(int i =1; i<=10; i++) System.out.println(“The number is” +i);

C# VERSUS JAVA C# and Java are both new generation languages descended from a line including C and C++. Each includes advanced features, like garbage collection, which remove some of the low level maintenance tasks from the programmer. In a lot of areas they are syntactically similar. C# contains more primitive data types than Java, and also allows more extension to the value types. For example, C# supports 'enumerators', types which are limited to a defined set of constant variables and structs, which are user- defined value types.

CONTINUE… Unlike Java, C# has the useful feature that we can overload various operators. Like Java, C# gives up on multiple class inheritance in favor of a single inheritance model extended by the multiple inheritance of interfaces. However, polymorphism is handled in a more complicated fashion, with base class methods either 'overriding' or 'hiding' super class methods.

According to Microsoft the top 6 Reasons to Switch to Visual C# from Java are: Familiarity Visual C# provides Java developers with a language that is immediately familiar and comfortable to them, regardless of skill level. Object-based Type System Visual C# provides developers with a modern and intuitive object-based type system that negates the need for complex and verbose data marshalling code commonly found in Java applications.

Continue… Powerful Component-oriented Development Visual C# provides developers with a powerful component-oriented development language that includes support for properties, indexers, delegates, inheritance, versioning, and attributes, without the need for esoteric or rigid naming patterns and companion classes. C# allows developers to use Extensible Markup Language (XML) comments to provide useful and customizable source code documentation.

CONTINUE… Target Any Device Visual C# lets developers target powerful desktop computers and a wide variety of handheld and wireless devices today using identical tools and skills. Leverage the.NET Framework Visual C# provides developers with access to the Microsoft.NET Framework, a robust, thread-safe library of collection classes, networking functionality, data access classes, and more.

ANY QUESTIONS?