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.

Slides:



Advertisements
Similar presentations
Windows Programming 1 Part 1 dbg --- Getting Acquainted with Visual Studio.NET and C#
Advertisements

The Microsoft View: Module 1: Getting Started. Copyright Course 2559B, Introduction to Visual Basic®.NET Programming with Microsoft®.NET. Lecture 1 Microsoft.
Web Development Using ASP.NET CA – 240 Kashif Jalal Welcome to week – 1.1 of…
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
1 An Introduction to Visual Basic Objectives Explain the history of programming languages Define the terminology used in object-oriented programming.
1 Chapter 20 — Creating Web Projects Microsoft Visual Basic.NET, Introduction to Programming.
Creating and Running Your First C# Program Svetlin Nakov Telerik Corporation
Creating a Console Application with Visual Studio
Platforms and tools for Web Services and Mobile Applications Introduction to C# Bent Thomsen Aalborg University 3rd and 4th of June 2004.
Programming Handheld and Mobile devices 1 Programming of Handheld and Mobile Devices Lecture 18 Microsoft’s Approach 1 –.NET Mobile Framework Rob Pooley.
Intro to dot Net Dr. John Abraham UTPA – Fall 09 CSCI 3327.
2. Introduction to the Visual Studio.NET IDE 2. Introduction to the Visual Studio.NET IDE Ch2 – Deitel’s Book.
Microsoft Visual Basic 2012 CHAPTER ONE Introduction to Visual Basic 2012 Programming.
Microsoft Visual Basic 2005 CHAPTER 1 Introduction to Visual Basic 2005 Programming.
UNIVERSIDAD TECNOLÓGICA ECOTEC. ISO 9001:2008 Module 2 Creating Web Applications by Using Microsoft® Visual Studio 2010 and Microsoft.NET–Based Languages.
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 Chapter One A First Program Using C#. 2 Objectives Learn about programming tasks Learn object-oriented programming concepts Learn about the C# programming.
Introduction to.NET Content : – Introduction to.NET Technology – Introduction to Web Based Applications – Introduction to ASP.NET 1 By : Amrendra Sharan.
A First Program Using C#
Hands-on Introduction to Visual Basic.NET Programming Right from the Start with Visual Basic.NET 1/e 6.
1 Introduction to.NET Framework. 2.NETFramework Internet COM+ Orchestration Orchestration Windows.NET Enterprise ServersBuildingBlockServices Visual Studio.NET.
Introduction to .Net Framework
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.
1 8/29/05CS360 Windows Programming Professor Shereen Khoja.
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.
Architecture of.NET Framework .NET Framework ٭ Microsoft.NET (pronounced “dot net”) is a software component that runs on the Windows operating.
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.
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
IE 411/511: Visual Programming for Industrial Applications
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#
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.
Tutorial 121 Creating a New Web Forms Page You will find that creating Web Forms is similar to creating traditional Windows applications in Visual Basic.
2. Introduction to the Visual Studio.NET IDE. Chapter Outline Overview of the Visual Studio.NET IDE Overview of the Visual Studio.NET IDE Menu Bar and.
Lecture Set 2 Part B – Configuring Visual Studio; Configuration Options and The Help System (scan quickly for future reference)
Tutorial 111 The Visual Studio.NET Environment The major differences between Visual Basic 6.0 and Visual Basic.NET are the latter’s support for true object-oriented.
1 Chapter 1 Introduction to Java. 2 History of Java Java Originally for _________________________ devices Then used for creating Web pages with __________________________.
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.
Introduction to .NET Framework
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.
Chapter 2 Part C – More on the Help System and The Object Browser (scan quickly for future reference)
ITF11012.NET.NET an Introduction. “This is the best time ever to be a software developer” Steve Ballmer, BUILD Conference, Anaheim, September 13 th 2011.
Module 1: Getting Started. Introduction to.NET and the.NET Framework Exploring Visual Studio.NET Creating a Windows Application Project Overview Use Visual.
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.
Hands-on Introduction to Visual Basic.NET Programming Right from the Start with Visual Basic.NET 1/e 6.
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.
Lecture Set 2 Part A: Creating an Application with Visual Studio – Solutions, Projects, Files 8/10/ :35 PM.
COMPUTER PROGRAMMING I 3.01 Apply Controls Associated With Visual Studio Form.
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.
IE 411/511: Visual Programming for Industrial Applications Lecture Notes #2 Introduction to the Visual Basic Express 2010 Integrated Development Environment.
COMPUTER PROGRAMMING I 3.01 Apply Controls Associated With Visual Studio Form.
1 1 1 Introduction to Java. 2 History of Java Java – Originally for intelligent consumer-electronic devices – Then used for creating Web pages with dynamic.
A Detailed Introduction To Visual Studio.NET CRB Tech ReviewsCRB Tech Reviews introduces you to the world of Visual.
IS 350 Course Introduction. Slide 2 Objectives Identify the steps performed in the software development life cycle Describe selected tools used to design.
Introduction to the Microsoft.NET Framework Chris Wastchak Student Ambassador to Microsoft.
C# Diline Giriş.
Introducing the Microsoft® .NET Framework
Introduction to .NET Framework Ch2 – Deitel’s Book
C# and ASP.NET Programming
Presentation transcript:

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 the Microsoft.NET platform C# is designed by Microsoft to combine the power of C/C++, Java and the productivity of Visual Basic The goal of C# and the.NET platform is to shorten development time - By allowing developers to spend their time working on the application logic instead of low level programming details 2

Compiling C# Source Code C# file names have the extension.cs To create the IL file, we need to compile the.cs file using the csc.exe (using the command line), followed by the name of the source file The result is a file with the same name but the.exe extension, which is called an assembly The assembly file contains all the information that the common runtime needs to know to execute the program e.g. Csc.exe File.cs 3

Features of C# C# syntax is very similar to Java (and thus C++) C# features are very similar to Java - Object-orientation with single inheritance - Support of interfaces - No pointers (except for unsafe code) - Exceptions - Threads - Namespaces (like Packages) - Strong typing - Garbage Collection - Reflection (In the.NET universe, reflection is the process of runtime type discovery) - Dynamic loading of code 4

5 Execution model C# and other Languages Cobol VB C++ C# CIL code (+ metadata) Loader/verifier Managed Code Uncompiled method call Execution Language compilers.NET languages JIT compiler

Namespaces A C# namespace is a way to group classes and is used in a manner similar to Java's package construct C# namespaces are similar to C++ namespaces and syntax Unlike Java, C# namespaces do not dictate the directory structure of source files in an application Namespaces can be nested similar to Java packages 6

.NET Framework Class Library The.NET Framework Class Library is made up of various namespaces. Namespaces are actually collections of types, logically organized. This enables you to have multiple versions of types with the same name but in different namespaces, thereby avoiding conflicts. Just as with a library you have collected in your home of useful books, the class library is a set of types that not only make up the.NET Framework itself, but also are available to developers for their use. Another big benefit of using the.NET Framework Class Library is to be able to use the classes in your applications consistently no matter whether you are using C# or Visual Basic.NET, Windows, or Web forms. Namespaces can also contain other namespaces in a hierarchical way. By creating sub-namespaces, you can categorize your types for use at different times. 7

.NET Framework Class Library When you create a.NET application, C# Express creates references to different namespaces, based on what kind of project you are creating. The best way to understand the.NET Framework Class Library is to take a look at some of the namespaces in it. 8

Object Browser: Tool of the Namespace Trade One of the tools worthwhile to look at when you are learning about namespaces is the Object Browser. With the Object Browser we can search through and locate the syntax for various classes you want to use. Once you locate the class in the namespace, you can press F1 and get help on it if necessary. The Object Browser is a great tool when you just want to look through a namespace to get an idea of what is included. 9

The Using Directive When the code window of any blank or new project we have a space called region also known as code blocks at the top made of using directives by default each and every type of project we have a list of namespaces those are included in the project to facilitate the programmer from basic classes or collections also called namespaces. 10

The Using Directive using system; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using system.Text; using system.Windows.Forms; 11

The Differences between C# and C# Express C# Express is actually what is called an IDE, or integrated development environment Language we are reading this in is that C# Express is a set of tools, including a special text editor that enables you to write computer programs in C#, the software development language. It also handles other necessary tasks such as building your application to either test for errors 12

The Differences between C# and C# Express Microsoft wanted to come up with a way to get those who are not yet C# developers and interested in programming of C#. There are a couple of different ways to create the C# applications. ◦ Use a simple note pad or third-party editor, and then use the command-line compiler. It is Really, only long-time hardcore developers use this method, where we need no support for development and want to struggle through compiling the programs by themselves. ◦ Use of Visual Studio.NET to development and maintain your C# code and application. This is the preferred method if you can afford Visual Studio. Microsoft introduced the Express series to give you experience with developing using the last method but with pared-down features. The full- blown versions of Visual Studio contain supersets of commands found in the Express versions 13

Members of the Express Series In an effort to expose new developers of all kinds to their different products, Microsoft has created the Express series Besides C# Express, other products in the series include: ❑ Visual Basic 2005 Express ❑ Visual C Express ❑ Visual J# 2005 Express ❑ Web Dev 2005 Express The first three in this list are additional programming languages. Web Dev Express introduces you to Web development with ASP.NET and can be used with each of the four languages in the Express series. 14

C# IDE 15

Steps to open console application 1. Choose Program Files → Visual C# 2005 Express from the Windows Start menu. The IDE opens, and the Start Page is displayed. 2. Select New → Project from the Files menu. The New Project dialog box appears, giving you a choice of templates. 3. Highlight Console Application. Remember that this type of application doesn’t have any forms or interface. It is also the easiest to start with. 4. Type in the name of the project you want to create. For this Try It Out, Chapter1Console was used, as shown in Figure Click OK. Your project is now created, as shown in Figure 2. 16

17 Figure 1

18 Figure 2