Applied Computing Technology Laboratory QuickStart C# Learning to Program in C# Amy Roberge & John Linehan November 7, 2005.

Slides:



Advertisements
Similar presentations
What Is Java? The name Java is a trademark of Sun Microsystems
Advertisements

C# Language Report By Trevor Adams. Language History Developed by Microsoft Developed by Microsoft Principal Software Architect Principal Software Architect.
Lab#1 (14/3/1431h) Introduction To java programming cs425
Client Side Programming Using Java Applet Outcomes: You will be expected to know: – Java Applets and HTML file; –bytecode and platform independent programs;
C#.NET C# language. C# A modern, general-purpose object-oriented language Part of the.NET family of languages ECMA standard Based on C and C++
C#.NET C# language. C# A modern, general-purpose object-oriented language Part of the.NET family of languages ECMA standard Based on C and C++
Outline Java program structure Basic program elements
Trey Mack James Moore Osa Osar-Emokpae
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 
Introduction to.NET Microsoft announced in June 2000 A new software –development model that allows applications created in disparate programming languages.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Introduction to Java Programming Language Junji Zhi University of Toronto 1.
Creating and Running Your First C# Program Svetlin Nakov Telerik Corporation
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.
Lecture 1: Overview of Java. What is java? Developed by Sun Microsystems (James Gosling) A general-purpose object-oriented language Based on C/C++ Designed.
CMSC 341 Introduction to Java Based on tutorial by Rebecca Hasti at
Platforms and tools for Web Services and Mobile Applications Introduction to C# Bent Thomsen Aalborg University 3rd and 4th of June 2004.
Differences between C# and C++ Dr. Catherine Stringfellow Dr. Stewart Carpenter.
C# Tutorial From C++ to C#. Some useful links Msdn C# us/library/kx37x362.aspxhttp://msdn.microsoft.com/en- us/library/kx37x362.aspx.
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#
C++ Programming. Table of Contents History What is C++? Development of C++ Standardized C++ What are the features of C++? What is Object Orientation?
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.
Creating and Running Your First C# Program Svetlin Nakov Telerik Corporation
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.
DAT602 Database Application Development Lecture 5 JAVA Review.
Chapter 1: A First Program Using C#. Programming Computer program – A set of instructions that tells a computer what to do – Also called software Software.
Computing with C# and the.NET Framework Chapter 1 An Introduction to Computing with C# ©2003, 2011 Art Gittleman.
Distributed Systems (236351) Tutorial 1 - Getting Started with Visual Studio C#.NET.
Introduction to Programming David Goldschmidt, Ph.D. Computer Science The College of Saint Rose Java Fundamentals (Comments, Variables, etc.)
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.
CS 11 java track: lecture 1 Administrivia need a CS cluster account cgi-bin/sysadmin/account_request.cgi need to know UNIX
CSE 131 Computer Science 1 Module 1: (basics of Java)
CS591x A very brief introduction to Java. Java Developed by Sun Microsystems was intended a language for embedded applications became a general purpose.
Basics of Java IMPORTANT: Read Chap 1-6 of How to think like a… Lecture 3.
Hello.java Program Output 1 public class Hello { 2 public static void main( String [] args ) 3 { 4 System.out.println( “Hello!" ); 5 } // end method main.
Netprog: Java Intro1 Crash Course in Java. Netprog: Java Intro2 Why Java? Network Programming in Java is very different than in C/C++ –much more language.
1 C# A brief overview by Jack Senechal and Bryan Powell.
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.
National Taiwan University Department of Computer Science and Information Engineering National Taiwan University Department of Computer Science and Information.
Copyright © Curt Hill Structured Data What this course is about.
BEGINNING PROGRAMMING.  Literally – giving instructions to a computer so that it does what you want  Practically – using a programming language (such.
Applied Computing Technology Laboratory QuickStart Java Learning to Program in Java Dr. Tom Way October 21, 2005.
C Sharp Web & Internet Programming Group Diana, Aren, Jeff, & Adam, Farrin 5/5/20081CS 311.
Core Java Introduction Byju Veedu Ness Technologies httpdownload.oracle.com/javase/tutorial/getStarted/intro/definition.html.
Chapters 2 & 3. .NET Software development model that allows applications created in disparate programming languages to communicate Universal data access.
C++ The reason why it is still in use. Table of Contents Disadvantages Disadvantages Advantages Advantages Compare with object-oriented programming language.
Developed at Sun Microsystems in 1991 James Gosling, initially named “OAK” Formally announced java in 1995 Object oriented and cant write procedural.
General Computer Science for Engineers CISC 106 Lecture 12 James Atlas Computer and Information Sciences 08/03/2009.
Session 1 C# Basics.
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.
Chapter 1 Java Programming Review. Introduction Java is platform-independent, meaning that you can write a program once and run it anywhere. Java programs.
Overview CNS 3260 C#.NET Software Development. 2.NET Framework Began in 2000 Developed in three years (2000 to 2003) Operating System Hardware.NET Framework.
AP Refresher Module Introduction to Java Advanced Programming. All slides copyright: Chetan Arora.
Features of JAVA PLATFORM INDEPENDENT LANGUAGE JAVA RUNTIME ENVIRONMENT (JRE) JAVA VIRTUAL MACHINE (JVM) JAVA APP BYTE CODE JAVA RUNTIME ENVIRONMENT.
Object Oriented Programming Lecture 2: BallWorld.
SESSION 1 Introduction in Java. Objectives Introduce classes and objects Starting with Java Introduce JDK Writing a simple Java program Using comments.
 It is a pure oops language and a high level language.  It was developed at sun microsystems by James Gosling.
INTRODUCTION BEGINNING C#. C# AND THE.NET RUNTIME AND LIBRARIES The C# compiler compiles and convert C# programs. NET Common Language Runtime (CLR) executes.
C# Part 1 Intro to C#. Background Designed to be simple, modern, general- purpose, OO, programming language Strong type checking, array bounds checking,
C# Diline Giriş.
C# and the .NET Framework
Introduction to C# AKEEL AHMED.
An Introduction to Java – Part I, language basics
Units with – James tedder
Chap 1 Chap 2 Chap 3 Chap 5 Surprise Me
(Computer fundamental Lab)
IS 135 Business Programming
Presentation transcript:

Applied Computing Technology Laboratory QuickStart C# Learning to Program in C# Amy Roberge & John Linehan November 7, 2005

Applied Computing Technology Laboratory 2 The C# Programming Language Developed in 2000 Created by Microsoft as part of their.NET platform to unite programming languages for web based usage Microsoft chose the chief programmer of Delphi, Anders Hejlsberg, to lead the development of C# Based on C++ and Java. More of an extension of existing languages than a new one. The name C# is supposed to be a progression of C++ and the # contains four + symbols.NET is proprietary. Mono is an open source project led by Novell to make a compatible set of.NET tools

Applied Computing Technology Laboratory 3 C# vs. Java Similarities Require a virtual machine Similar syntax Automatic garbage collection Object oriented Large class library C# over Java Allows “structs” Switch statements can be applied to strings (vs. characters or numbers) Support for output parameters, allowing multiple values to be returned

Applied Computing Technology Laboratory 4 C# Advantages Only allows single inheritance, but can implement any number of interfaces Provides a balance of C++, rapid development, Visual Basic, Delphi, and Java Automatic garbage collection

Applied Computing Technology Laboratory 5 C# Disadvantages Requires the.NET Runtime Environment to run More overhead Doesn’t have true multiple inheritance “Unsafe code” is required to manage memory directly and can be very complex and difficult to debug

Applied Computing Technology Laboratory 6 C# Specification Available from MSDN (Microsoft Developer Network): Current as of 3/2005, C# 2.0 Explains: Grammar Structure Generics Types, values, variables, iterators Type conversions and promotions Classes, methods Arrays, exceptions, execution, blocks, statements, expressions, declarations, interfaces, arguments

Applied Computing Technology Laboratory 7 C# Grammar Available on MSDN web site us/csspec/html/vclrfcsharpspec_c.asp us/csspec/html/vclrfcsharpspec_c.asp Example: Type: Identifier [TypeArguments]{. Identifier [TypeArguments]} {[]} BasicType TypeArguments: TypeArgument: Type ? [( extends | super ) Type] Identifier: IDENTIFIER BasicType: byte | short | char | int | long | float | double | boolean

Applied Computing Technology Laboratory 8 Reserved Words abstractasbaseboolbreakbytecase catchcharcheckedclassconstcontinuedecimal defaultdelegatedodoubleelseenumevent explicitexternfalsefinallyfixedfloatfor foreachgotoifimplicitinintinterface internalislocklongnamespacenewnull objectoperatoroutoverrideparamsprivateprotected publicreadonlyrefreturnsbytesealedshort sizeofstackallocstaticstringstructswitchthis throwtruetrytypeofuintulongunchecked unsafeushortusingvirtualvoidvolatilewhile

Applied Computing Technology Laboratory 9 Step 1: Getting Started Download & install.NET Framework SDK 1.1: 9f41-a333c6b9181d&displaylang=en 9f41-a333c6b9181d&displaylang=en Double-click on file to run installer Follow all the defaults

Applied Computing Technology Laboratory 10 Step 2: SharpDevelop Opensource IDE Download & install SharpDevelop from: Run the installation and launch SharpDevelop

Applied Computing Technology Laboratory 11 Step 3: Write a simple program File->New->Combine Select “C#” category and new Console Application template and click Create Name project “Hello World” SharpDevelop recognizes the Hello World name and automatically produces the code

Applied Computing Technology Laboratory 12 Hello World using System; namespace Hello_World { class MainClass { public static void Main(string[] args) { Console.WriteLine("Hello World!"); }

Applied Computing Technology Laboratory 13 Step 4: Run the program Click Build Select Build Combine View the console at the bottom for progress After the file is compiled, select Debug and then click Run. Watch the command prompt window open and display the output

Applied Computing Technology Laboratory 14 Learning more about C# Visit the QuickStart Languages web site Visit C# Station Visit the Microsoft Developer Center Find Helpful C# tools Wikipedia