Introduction to C# Tom Roeder CS 215 2006fa. Goals of the course Introduce C# language ECMA standard originally developed by MSR not just Java + C++ many.

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
.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.
Süsteemprogrammeerimine C# keeles (Microsoft.NET,.NET Framework 2.0) Vladimir Kjahrenov.
SSCLI: The Microsoft Shared Source CLI Implementation Mark Lewin Microsoft Research
.Net Overview Giuseppe Attardi Università di Pisa.
ISYS 512 Business Application Design and Development with.Net David Chao.
CSE3030Lecture 11 Know Your User The First Slogan.
Thursday Evening 6.30VB.NET Introduction 7.30Break for food 8.00VB.NET Migration 8.45Q & A 9.00Done.
ISYS 512 Business Application Design and Development with.Net David Chao.
An Overview of.NET Gavin King.NET Developer Group Microsoft Ltd
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.
Platforms and tools for Web Services and Mobile Applications Introduction to C# Bent Thomsen Aalborg University 3rd and 4th of June 2004.
Creating and Running Your First C# Program Telerik Software Academy Telerik School Academy.
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.
ISYS 350 Business Application Development
Microsoft Windows “Longhorn” future version of Windows OS Jan “Honza” Stoklasa janstok at microsoft dot com janstok at microsoft dot com Academic Program.
Introduction to .Net Framework
Introduction to Programming
ISYS 512 Business Application Design and Development with.Net David Chao.
VS.NET Syllabus By Peter Huang.
Microsoft.NET Framework Overview Abidi Mahmoud Seminarium on Component -based Software Engineering.
.NET Overview. 2 Objectives Introduce.NET –overview –languages –libraries –development and execution model Examine simple C# program.
Session 1 - Introduction and Data Access Layer
C# A 1 CSC 298 Introduction to C#. C# A 2 What to expect in this class  Background: knowledge of an object oriented language of the C++, Java, … family.
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.
.NET Framework & C#.
Introduction to .NET Framework
Creating and Running Your First C# Program Svetlin Nakov Telerik Corporation
Introduction .NET Framework
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.
Distributed Systems (236351) Tutorial 1 - Getting Started with Visual Studio C#.NET.
CS795/895: Introduction. Topics Distributed Systems –Availability –Performance –Web Services Security –Authentication –Authorization –Confidentiality.
Sadegh Aliakbary Sharif University of Technology Fall 2012.
Component-Based Software Engineering Introduction to.NET Paul Krause.
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#
CS 11 java track: lecture 1 Administrivia need a CS cluster account cgi-bin/sysadmin/account_request.cgi need to know UNIX
Introduction to VB.Net. What is.NET? A brand of Microsoft technologies A platform for creating distributed Web applications A combination of new and updated.
AUC Technologies Projects Consulting, Development, Mentoring, and Training Company Application Foundation Presented By : Naveed Sattar Software Engineer.
Applied Computing Technology Laboratory QuickStart C# Learning to Program in C# Amy Roberge & John Linehan November 7, 2005.
.Net – The First Glance What Is.Net, Why Use.Net.
tom perkins1 XML Web Services -.NET FRAMEWORK – Part 1 CHAPTER 1.1 – 1.3.
ISYS 350 Business Application Development David Chao.
National Taiwan University Department of Computer Science and Information Engineering National Taiwan University Department of Computer Science and Information.
Module 3: Using Microsoft.NET- Based Languages. Overview Overview of the.NET-Based Languages Comparison of the.NET-Based Languages.
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.
A comparison of C-Sharp and Java Zunaid Jogee Supervisor: T. Stakemire.
ISYS 512 Business Application Design and Development with.Net David Chao.
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,
IT274 Intermediate C# Programming Instructor : Vladimir Gubanov, PhD AIM : vladimirg77.
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.
Introducing the Microsoft® .NET Framework
C# and the .NET Framework
Introduction to .NET Framework Ch2 – Deitel’s Book
Microsoft .NET 3. Language Innovations Pan Wuming 2017.
Application Foundation
.NET and .NET Core 2. .NET Runtimes Pan Wuming 2017.
CS360 Windows Programming
Module 0: Introduction Chapter 2: Getting Started
Introduction to C# AKEEL AHMED.
Programming in C# CHAPTER 1
.Net Framework Details Imran Rashid CTO at ManiWeber Technologies.
IS 135 Business Programming
Presentation transcript:

Introduction to C# Tom Roeder CS fa

Goals of the course Introduce C# language ECMA standard originally developed by MSR not just Java + C++ many extensions Introduce.NET framework future of Windows base of Microsoft’s C# implementation

Non-goals Teach you to program should be very comfortable writing OO code we will not cover much if any basic programming Introduce object oriented languages not even teach you OO style (except wrt C#) expected to write all code in OO style Give you a detailed grade S/U only even homework

S/U Details Requirements for the course come to lecture participate do three assignments Assignments are S/U will not be giving a detailed grade show me that you understand the concepts, and can write C# code All three assignments will be online soon must be completed by the end of the course

Administrative Details Class time MWF 12:20-1:10 office hours: W 10:30-12 or by appointment (4112 Upson) Prerequisites: CS 211/212 really: experience in OO coding/concepts Academic Integrity Do not submit work that is not your own minimum penalty: U in the course

Useful Tools Visual C# Express: Google “Visual C# Express” in Visual Studio: MSDNAA must be version 2005: we need C# 2.0 Mono: Open Source impl for Linux: not quite at 2.0 Rotor: Shared Source impl for Windows (through 2.0) Used to work on BSD / OS X, too

Useful Tools Portable.NET: yet another open source impl CMS: we will use this for homework turn on your notifications! Course Webpage: will post lectures online as well as any errata for the homework

CSUGLab You all will have accounts MSDNAA access: let me know if you don’t currently have it Visual Studio.NET 2005 should be installed there

Syllabus Syllabus (10 more lectures) C# constructs: 5 lectures Types, Delegates, Generics, Reflection, Iterators.NET Memory Management: 1 lecture Topics: 4 lectures C# 3.0, Threading, Security, MSIL, MSH

Quiz 1 Each class will begin with a quiz not for credit but for knowledge but I will collect them and see what you know Today’s quiz will be on prerequisites OO programming, mainly to do with Java If you don’t know Java, but do have OO experience, it’s OK talk to me after if you have trouble

What is.NET? A Framework in which to run code A Common Language Runtime (CLR) runs all programs C# compiles to Microsoft Intermediate Language MSIL runs on CLR Virtual Machine like Java code written in many languages compiles to MSIL A Common Language Specification (CLS) A Common Type System (CTS)

What is.NET? Runtime Operating System.NET Framework Common Type System Common Language Runtime Building Blocks (e.g. for Services) Services:.NET and COM+ SQL ServerBizTalk... Languages : C#, Visual Basic, etc.NET Applications Enterprise Servers... Sharepoint... Web Services From MSDN

What is the CLR? Class Loader MSIL to Native Compilers (JIT) Code Manager Garbage Collector (GC) Security EngineDebug Engine Type CheckerException Manager Thread SupportCOM Marshaler Base Class Library Support From MSDN

What is the CTS? A set of common types any language that runs in CLR should implement no syntax specified Languages often define aliases For example CTS defines System.Int32 – 4 byte integer C# defines int as an alias of System.Int32

What is the CTS? From MSDN

What is the CLS? A specification of language features how methods may be called when constructors are called subset of the types in CTS are allowed For example Code that takes UInt32 in a public method UInt32 is not in the CLS Can mark classes as CLS-compliant not marked is assumed to mean not compliant

The Class Libraries The common classes used in many programs like Java Class Library eg. System.Console.WriteLine XML, Networking, Filesystem, Crypto, containers Can inherit from many of these classes Many languages run on.NET framework C#, C++, J#, Visual Basic even have Python (see IronPython)

Assemblies Code contained in files called “assemblies” code and metadata.dll as before to run: public static void Main(string[] args) types private: local directory, not accessible by others  eg. Wolfram.NETLink shared: well-known location, can be GAC strong names: use crypto for signatures  then can add some versioning and trust

COM vs.NET Historically, COM provided this integration support for interfaces and interaction given a GUID, lookup the type library dynamically instantiate class do RPC to make calls in many cases Difficult to get right software engineering problems not type safe at all

ASP.NET and ADO.NET Use.NET languages in web pages thus can write typesafe code server-side or client-side Sharepoint interactions can log in Use the CLR to access databases in the manner of ODBC provides classes for access

Windows PowerShell New shell originally for MS Vista available for WinXP/2k3 native.NET instantiates arbitary.NET classes and accesses them Also can access COM objects Allows better interaction with programs Can it surpass bash and others?

First C# Program using System; namespace Test { int a = 137; class Hello { public static void Main(string[] args) { Console.WriteLine(“Hello {0}”, a); } } }

Constructions of Note using like import in Java: bring in namespaces namespace disambiguation of names like Internet hierarchical names and Java naming class like in Java single inheritance up to object

Constructions of Note Console.Write(Line) Takes a formatted string: “Composite Format” Indexed elements: e.g., {0} can be used multiple times only evaluated once {index [,alignment][:formatting]} also can use as in Java “Test “ + a

More C# : basic inheritance class A { protected int a; public virtual void print() { Console.WriteLine(“a = “ + a); } class B : A { public override void print() { Console.WriteLine(“a really = “ + (a + 137)); }