Week 1: Introduce ➤ What is the.NET Framework ?  CLR, MSIL,IL,FLC  Garbage collection  Namespace ➤ What C# is and how it relates to the.NET Framework.

Slides:



Advertisements
Similar presentations
By Sam Nasr Nasr Information Systems May 14, 2013.
Advertisements

Henrico Dolfing Business Segment Partners. Océ Document Technologies GmbH2 June, NET Framework Version 3.0.
Introduction to the C# Programming Language for the VB Programmer.
ISYS 512 Business Application Design and Development with.Net David Chao.
Chapter 3: Introducing the Microsoft.NET Framework and Visual Basic.NET Visual Basic.NET Programming: From Problem Analysis to Program Design.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
1 An Introduction to Visual Basic Objectives Explain the history of programming languages Define the terminology used in object-oriented programming.
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.
Creating a Console Application with Visual Studio
Object Oriented Software Development 1. Introduction to C# and Visual Studio.
Intro to dot Net Dr. John Abraham UTPA – Fall 09 CSCI 3327.
Microsoft Visual Basic 2012 CHAPTER ONE Introduction to Visual Basic 2012 Programming.
Microsoft Visual Basic 2005 CHAPTER 1 Introduction to Visual Basic 2005 Programming.
Creating and Running Your First C# Program Telerik Software Academy Telerik School Academy.
A Free sample background from © 2001 By Default!Slide 1.NET Overview BY: Pinkesh Desai.
A First Program Using C#
Neal Stublen Overview of.NET Windows Applications Microsoft Windows OS / Intel Platform Windows Application File SystemNetworkDisplay.
© 2004 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin Programming the Web Using ASP.Net Chapter 2: The ASP.Net Template Dave.
1 Introduction to.NET Framework. 2.NETFramework Internet COM+ Orchestration Orchestration Windows.NET Enterprise ServersBuildingBlockServices Visual Studio.NET.
An Introduction to ASP.NET Ed Dunhill blogs.msdn.com/edunhill SLIDE7.
Intro to C# Dr. John P. Abraham UTPA. Background required Thorough C++ programming – If you made an A in 1370/1170 you will do fine with some effort.
Module 1: Introduction to C# Module 2: Variables and Data Types
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.
.NET Framework & C#.
Microsoft Visual Basic 2005: Reloaded Second Edition
Appendix D: Microsoft.NET Framework Overview. Overview.NET Framework Architecture.NET Namespaces.
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
Lesley Bross, August 29, 2010 ArcGIS 10 add-in glossary.
CSC 494/594 C# and ASP.NET Programming. C# 2012 C# Object-oriented language with syntax that is similar to Java.
Neal Stublen Class Objectives  Develop an understanding of the.NET Framework  Gain proficiency using Visual Studio  Begin learning.
Assemblies & Namespaces1. 2 Assemblies (1).NET applications are represented by an assembly An assembly is a collection of all software of which the application.
All 300/400 Level CS Major Courses Tutoring Location: SEC 3433 Sign up or walk-in Introduction2-1.
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.
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.
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#
Week 1: THE C# LANGUAGE Chapter 1: Variables and Expressions ➤ Included in Visual Studio.NET ➤ What the.NET Framework is and what it contains ➤ How.NET.
NOTE: To change the image on this slide, select the picture and delete it. Then click the Pictures icon in the placeholder to insert your own image. WEB.
Lecture Set 2 Part A: Creating an Application with Visual Studio – Solutions, Projects, Files.
Languages and IDE (Integrated Development Environment)
Rajiv and Shipra Introduction to.NET (asp.net,c#,vb)
tom perkins1 XML Web Services -.NET FRAMEWORK – Part 1 CHAPTER 1.1 – 1.3.
Compunet Corporation1 Programming with Visual Basic.NET Fundamentals of Programming Lecture # 1 Tariq Ibn Aziz.
1 Programming Environment and Tools VS.Net 2012 First project MSDN Library.
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.
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.
July 22, 2001Introduction to.NET1 Introduction to.NET Framework Gholamali Semsarzadeh July 2001.
Text Introduction to.NET Framework. CONFIDENTIAL Agenda .NET Training – Purpose  What is.NET?  Why.NET?  Advantages  Architecture  Components: CLR,
Lecture Set 1 Part B: Understanding Visual Studio and.NET – Structure and Terminology 1/16/ :04 PM.
Microsoft Visual Basic 2015 CHAPTER ONE Introduction to Visual Basic 2015 Programming.
INTRODUCTION BEGINNING C#. C# AND THE.NET RUNTIME AND LIBRARIES The C# compiler compiles and convert C# programs. NET Common Language Runtime (CLR) executes.
IS 350 Course Introduction. Slide 2 Objectives Identify the steps performed in the software development life cycle Describe selected tools used to design.
C# Diline Giriş.
Introducing the Microsoft® .NET Framework
Introduction to .NET Framework
Foundations of .Net Programming with C#
C# and the .NET Framework
Introduction to .NET Framework Ch2 – Deitel’s Book
Application Foundation
Module 0: Introduction Chapter 2: Getting Started
Module 1: Getting Started
CIS16 Application Development – Programming with Visual Basic
.NET Base Type (CTS Data Type) Managed Extensions for C++ Keyword
IS 135 Business Programming
Presentation transcript:

Week 1: Introduce ➤ What is the.NET Framework ?  CLR, MSIL,IL,FLC  Garbage collection  Namespace ➤ What C# is and how it relates to the.NET Framework

WHAT IS THE.NET FRAMEWORK? Microsoft’s modern software development platform Programs executed by Common Language Runtime (CLR) FLC(Framework class library) Includes a large library of components (classes) which can be used in programs Supports several programming languages, including C#, Visual Basic, C++, J# Windows Programming 1Chapter 1: Introducing C#Slide 2

.NET Framework Windows Programming 1 Chapter 1: Introducing C#Slide 3

.NET Framework 4.NET 1.1.NET 1.1 (Apr-2003) VS.NET 2003 Default: Server 2003.NET 3.5.NET 3.5 (Nov-2007) VS.NET 2008 Default: Windows 7.NET 3.0.NET 3.0 (Nov-2006) Default: Windows Vista, Server 2008.NET 2.0.NET 2.0 (Nov-2005) VS.NET NET 1.0 (Feb-2002).NET 4.0.NET 4.0 (2010) VS.NET 2010 Default: Windows 7

Writing Applications Using the.NET Framework CLR: Common Language Runtime MSIL or IL: Microsoft Intermediate Language JIT: just-In-Time compiler Assemblies Managed Code Garbage Collection Windows Programming 1Chapter 1: Introducing C#Slide 5

.NET Framework -CLR Common Language Runtime Architecture Windows Programming 1Chapter 1: Introducing C#Slide 6

Writing Applications Using the.NET Framework 7 MS IL CLR C++ Compiler C# Compiler J#.NET Compiler CT C#.NET CT VB.NET CT C++.NET CT J#.NET VB.NET Compiler Programmer

Writing Applications Using the.NET Framework Windows Programming 1Chapter 1: Introducing C#Slide 8

Assembly Managed Modules Chứa IL code để thực thi Chứa resource, metadata… Portable Executable (PE) Process assembly (EXE) Library assembly (DLL) 9.NET Assembly

Managed Code Software that is written using the.NET Framework is called Managed 10 Windows (OS khác) Windows (OS khác) Legacy Software (unmanaged code) Legacy Software (unmanaged code) Common Language Runtime Managed Executable

Garbage collection 11 class myClass{ void Method(){ variable v1; variable v2; do{ …. } class myClass{ void Method(){ variable v1; variable v2; do{ …. } B E C A D Managed Heap A và D sẽ bị xoá do ko còn tham chiếu hay truy cập tới

Namespaces Namespaces are also used as a means of categorizing items in the.NET Framework Qualified names use period characters (.) between namespace levels Within a namespace, you can define nested namespaces, also using the namespace keyword. Windows Programming 1 Chapter3: Variables and Expressions Slide 12

Namespaces Windows Programming 1 Chapter3: Variables and Expressions Slide 13

14 NamespaceDescription System Chứa lớp toán học, chuyển đổi dữ liệu System.IO Các lớp cho thao tác Input và Output System.Net Các lớp liên quan đến network protocol System.Collections Chức các lớp liên quan đến xử lý tập hợp System.Data Các lớp của ADO.NET System.Drawing Các lớp thực thi chức năng GUI System.Threading Các lớp lập trình MultiThread System.Web Các lớp liên quan đến HTTP protocol System.Xml Các lớp liên quan XML Namespace

Đặc tính lõi: IL, kiểu dữ liệu trong CTS Hỗ trợ Win GUI và control WebForm (ASP.NET) Data Access (ADO.NET) Directory Access File System, registry access Networking and web browsing.NET attributes and reflection WinOS access COM interoperability 15 Framework (Base) Class Library

Run.NET App from Client Required MS.NET Framework compatible MS.NET Framework 2.0, 3.5 Install.NET 3.5 Full Redistributable package (dotnetfx35.exe, 197MB) Windows Vista comes with.NET Framework 3.0 Windows 7 comes with.NET Framework NE T App.NE T App.NET App.NET App.NET App.NET App

17

WHAT IS C#? Applications You Can Write with C# Windows applications Web applications Web services: Windows Programming 1Chapter 1: Introducing C#Slide 18

Visual Studio Powerful, professional Integrated Development Environment (IDE) Integrates compilers, debugger and many other useful tools for development Can work with many different types of project, including: Console (text-based) applications Windows (GUI) applications Web applications (ASP.NET) Class libraries Windows Programming 1Chapter 1: Introducing C#Slide 19

Visual Studio Solution explorer Toolbox windows Visual designer Properties windows Windows Programming 1Chapter 1: Introducing C#Slide 20

Visual Studio projects A project contains source code files, settings and resources for an application May contain references to class libraries May contain data used by application Building a project: Compiles source files Copies non-source files to output folder Creates an assembly in output folder Building a solution builds all its projects Windows Programming 1Chapter 1: Introducing C#Slide 21

Project details References – class libraries used by this application References – class libraries used by this application Solution folder contents Project folder contents Solution file (.sln) and project file (.csproj) are created by VS and contain solution/project configuration information Windows Programming 1Chapter 1: Introducing C#Slide 22

Creating a Visual Studio project Demo Windows Programming 1Chapter 1: Introducing C#Slide 23

Week 1: THE C# LANGUAGE Chapter 2: Writing a C# Program  A basic working knowledge of Visual Studio 2010 and Visual C# 2010 Express Edition  How to write a simple console application  How to write a Windows Forms application

Visual C# 2010 Ultimate Windows Programming 1 Chapter 2: Writing a C# Program Slide 25

CONSOLE APPLICATIONS Windows Programming 1 Chapter 2: Writing a C# Program Slide 26

WINDOWS FORMS APPLICATIONS MO_BAI1 Windows Programming 1 Chapter 2: Writing a C# Program Slide 27

The Solution Explorer Windows Programming 1 Chapter 1: Introducing C#Slide 28

The Properties Window Windows Programming 1 Chapter 1: Introducing C#Slide 29

Code view Windows Programming 1 Chapter 1: Introducing C#Slide 30

The Error List Window Windows Programming 1 Chapter 1: Introducing C#Slide 31

SUMMARY Windows Programming 1 Chapter 2: Writing a C# Program Slide 32

Week 1: THE C# LANGUAGE Chapter 3:Variables and Expressions Basic C# syntax Variables and how to use them Expressions and how to use them

BASIC C# SYNTAX The look and feel of C# code is similar to that of C++ and Java. C# compilers ignore additional spacing in code, whether it results from spaces, carriage returns, or tab characters (collectively known as whitespace characters). Statements C# is a block-structured language, meaning statements are part of a block of code. Windows Programming 1 Chapter3: Variables and Expressions Slide 34

block These blocks, which are delimited with curly brackets ({ and }), may contain any number of statements, or none at all Windows Programming 1 Chapter3: Variables and Expressions Slide 35

comments Comments can be created using //… Multi-lines comments use /* … */ You can use single-line comments that start with three / symbols instead of two /// A special comment Comments are ignored by the compiler Used only for human readers Windows Programming 1 Chapter3: Variables and Expressions Slide 36

The code outlining You can do this with the #region and #endregion keywords, which define the start and end of a region of code that can be expanded and collapsed. Windows Programming 1 Chapter3: Variables and Expressions Slide 37

VARIABLES C# syntax for declaring variables merely specifies the type and variable name: ; int intNumberOfStudents; Declaration includes Name, follow Naming Convention Rules Data Type Required Value for Constants Optional Initial Value for Variables Windows Programming 1 Chapter3: Variables and Expressions Slide 38

Simple Types Windows Programming 1 Chapter3: Variables and Expressions Slide 39

Simple Types Windows Programming 1 Chapter3: Variables and Expressions Slide 40

Simple Types Windows Programming 1 Chapter3: Variables and Expressions Slide 41

Using Simple Type Variables Mo_b3 Windows Programming 1 Chapter3: Variables and Expressions Slide 42

Variable Naming The first character of a variable name must be either a letter, an underscore character ( _ ), or the at symbol Subsequent characters may be letters, underscore characters, or numbers. Windows Programming 1 Chapter3: Variables and Expressions Slide 43

String Literals Windows Programming 1 Chapter3: Variables and Expressions Slide 44

String Literals This means that the following strings are equivalent: "Karli \’s string." "Karli \u0027 s "A short list: item 1 item 2“ "C:\Temp\MyDir\MyFile.doc" Windows Programming 1 Chapter3: Variables and Expressions Slide 45

EXPRESSIONS Operators can be roughly classified into three categories: ➤ Unary— Act on single operands ➤ Binary—Act on two operands ➤ Ternary—Act on three operands Windows Programming 1 Chapter3: Variables and Expressions Slide 46

Mathematical Operators Windows Programming 1 Chapter3: Variables and Expressions Slide 47

Windows Programming 1 Chapter3: Variables and Expressions Slide 48

Manipulating Variables with Mathematical Operators Windows Programming 1 Chapter3: Variables and Expressions Slide 49

Assignment Operators Windows Programming 1 Chapter3: Variables and Expressions Slide 50

Operator Precedence Windows Programming 1 Chapter3: Variables and Expressions Slide 51

SUMMARY Windows Programming 1 Chapter 3: Variables and Expressions Slide 52