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.

Slides:



Advertisements
Similar presentations
Intesar G Ali IT DepartmentPalestinian Land Authority Web services Prepared by: Intesar Ali IT Department PLA August 2010.
Advertisements

Programming Dr. Abraham Most slides are from your textbook.
© by Pearson Education, Inc. All Rights Reserved.
Programming Our First Java Program Yingcai Xiao. What to Do Set up for Java Programming Write our first Java Program with IDE Write our first Java Program.
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.
1 Web Services Visual C# 2008 Step by Step Chapter 30.
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
Web service testing Group D5. What are Web Services? XML is the basis for Web services Web services are application components Web services communicate.
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 2005 CHAPTER 8 Using Procedures and Exception Handling.
1 Chapter One A First Program Using C#. 2 Objectives Learn about programming tasks Learn object-oriented programming concepts Learn about the C# programming.
Chapter 2 Build Your First Project A Step-by-Step Approach 2 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta Eaton.
Lab 8 – C# Programming Adding two numbers CSCI 6303 – Principles of I.T. Dr. Abraham Fall 2012.
A First Program Using C#
Visual Basic Chapter 1 Mr. Wangler.
Hands-on Introduction to Visual Basic.NET Programming Right from the Start with Visual Basic.NET 1/e 6.
Hello World In C++ and Microsoft Visual C++. Directions to begin a project 1. Go to All Programs 2. Open Visual Studio C++ 3. Click on New Project 4.
Microsoft Visual Basic 2012 Using Procedures and Exception Handling CHAPTER SEVEN.
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.
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
Creating and Running Your First C# Program Svetlin Nakov Telerik Corporation
Neal Stublen Class Objectives  Develop an understanding of the.NET Framework  Gain proficiency using Visual Studio  Begin learning.
Programming with Microsoft Visual Basic 2012 Chapter 12: Web Applications.
CIS 375—Web App Dev II Microsoft’s.NET. 2 Introduction to.NET Steve Ballmer (January 2000): Steve Ballmer "Delivering an Internet-based platform of Next.
IE 411/511: Visual Programming for Industrial Applications
Chapter 3 Introducing Visual Basic.NET. 3.1 Visual Basic.NET Windows Programming -Used to create Windows, Web, and Console applications -Uses predefined.
CSCI/CMPE 4341 Topic: Programming in Python Chapter 1: Introduction to Python Xiang Lian The University of Texas – Pan American Edinburg, TX 78539
Intro to C++. Getting Started with Microsoft Visual Studios Open Microsoft Visual Studios 2010 Click on file Click on New Project Choose Visual C++ on.
Lecture 1 Programming in C# Introducing C# Writing a C# Program.
Web Programming: Client/Server Applications Server sends the web pages to the client. –built into Visual Studio for development purposes Client displays.
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.
11 Web Services. 22 Objectives You will be able to Say what a web service is. Write and deploy a simple web service. Test a simple web service. Write.
CSCI 3328 Object Oriented Programming in C# Chapter 1: Introduction to C# Xiang Lian The University of Texas Rio Grande Valley Edinburg, TX 78539
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.
Microsoft Visual Basic 2008 CHAPTER TWELVE Cell Phone Applications and Web Services.
Using Microsoft Visual Studio 2005 Original by Suma Rao Revised by John G. McMahon ( 9/6/2008 )
Visual Basic.NET BASICS Lesson 1 A First Look at Microsoft Visual Basic.NET.
Microsoft Visual Basic 2005 BASICS Lesson 1 A First Look at Microsoft Visual Basic.
Intro to dot Net Dr. John Abraham UTPA CSCI 3327.
1 Programming Environment and Tools VS.Net 2012 First project MSDN Library.
Forms and Controls Part 3 dbg --- Naming conventions, Button, Event handlers, Label.
Hands-on Introduction to Visual Basic.NET Programming Right from the Start with Visual Basic.NET 1/e 6.
Intro to Web Services Dr. John P. Abraham UTPA. What are Web Services? Applications execute across multiple computers on a network.  The machine on which.
Copyright (c) 2003 by Prentice Hall Provided By: Qasim Al-ajmi Chapter 2 Introduction to Visual Basic Programming Visual Basic.NET.
Object-Oriented Application Development Using VB.NET 1 Chapter 2 The Visual Studio.NET Development Environment.
Lecture Set 2 Part A: Creating an Application with Visual Studio – Solutions, Projects, Files 8/10/ :35 PM.
Forms and Controls Part 3 dbg --- Naming conventions, Button, Event handlers, Label.
Chapter 27 Getting “Web-ified” (Web Applications) Clearly Visual Basic: Programming with Visual Basic nd Edition.
.NET Mobile Application Development XML Web Services.
Visual Basic.Net. Software to Install Visual Studio 2005 Professional Edition (Requires Windows XP Pro) MSDN Library for Visual Studio 2005 Available.
 2002 Prentice Hall. All rights reserved. 1 Introduction to the Visual Studio.NET IDE Outline Introduction Visual Studio.NET Integrated Development Environment.
Microsoft Visual C# 2010 Fourth Edition Chapter 3 Using GUI Objects and the Visual Studio IDE.
Introduction to Web Services Srinath Vasireddy Support Professional Developer Support Microsoft Corporation.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
Chapter 2 Build Your First Project A Step-by-Step Approach 2 Exploring Microsoft Visual Basic 6.0 Copyright © 1999 Prentice-Hall, Inc. By Carlotta Eaton.
Chapter 2: The Visual Studio .NET Development Environment
How to design a Windows Forms application
CSCI 3328 Object Oriented Programming in C# Chapter 1: Introduction to C# UTPA – Fall 2012 This set of slides is revised from lecture slides of Prof.
Hands-on Introduction to Visual Basic .NET
CIS16 Application Development Programming with Visual Basic
IS 135 Business Programming
Presentation transcript:

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. – If you have already taken 2380, you will find this course not very difficult. You need to be able to look up how to get things done (example, look up syntax)

Programming, programming, Programming This class is unlike other courses in that you will spend a lot of time doing actual programming. You should never copy a program from someone else. Even if your program does not perform as good as someone else’s, you should submit what you have. You should not hesitate to ask questions in class.

Assignments Unless I announce it, programs are due in one week after assignment is given in class, or posted. Sometimes, I will ask you to modify a program for the next class period. Occasionally, I will give two weeks for difficult programs. You should work on a program the same day it is assigned. That way you can ask questions during the following class period.

Use of the textbook I will not be covering chapter by chapter. I will cover important points needed to complete the assignments. You need to search the index in the back to find the topic needed for each assignment. You can also obtain help from MSDN at the Microsoft site.

Hello program using System; //using System.Collections.Generic; //using System.Linq; //using System.Text; namespace sayHello { class sayHello { static void Main(string[] args) { Console.WriteLine("Hello!"); Console.WriteLine("Welcome to Dr. Abraham's C# Class!"); Console.ReadLine(); }

Versions of C# You can program using 2008 or Our book only covers Usually it takes a year or so for new books to come out. If you use 2010, you have to find help from other sources or the Web.

The.Net framework Underneath the applications you develop using c# is the.NET Framework containing a library of classes needed for windows forms and web forms. The.NET framework interacts with the Common Language Runtime (CLR), which in turn interacts with the operating system and the hardware. This way programs you write using C# can run on different operating systems and hardware platforms as long as it has the correct version of the.NET installed on it.

Common Language Runtime The Microsoft Common Language Runtime (CLR) and the.NET Framework class libraries – collectively called the.NET Framework. CLR is Microsoft's implementation of the Common Language Infrastructure (CLI) standard, which defines an execution environment for program code. In the CLR, code is expressed in a form of bytecode called the Common Intermediate Language (CIL, previously known as MSIL—Microsoft Intermediate Language). All programming languages within the visual studio compile into an intermediate language (CIL). At runtime, the CLR's just-in-time compiler converts the CIL code into code, native to the operating system. Alternatively, the CIL code can be compiled to native code in a separate step prior to runtime by using the Native Image Generator (NGEN). This speeds up all later runs of the software as the CIL-to- native compilation is no longer necessary.

.NET is built on the following Internet Standards HTTP, the communication protocol between Internet Applications XML, the format for exchanging data between Internet Applications SOAP, the standard format for requesting Web Services UDDI, the standard to search and discover Web Services

Web Services Web Services provide data and services to other applications. Web services use the standard web protocols HTTP, XML, SOAP, WSDL, and UDDI. Future applications will access Web Services via standard Web Formats (HTTP, HTML, XML, and SOAP), with no need to know how the Web Service itself is implemented. Web Services are main building blocks in the Microsoft.NET programming model.

Web services building blocks XML (eXtensible Markup Language) is a well known standard for storing, carrying, and exchanging data. SOAP (Simple Object Access Protocol) is a lightweight platform and language neutral communication protocol that allows programs to communicate via standard Internet HTTP. WSDL (Web Services Description Language) is an XML-based language used to define web services and to describe how to access them. UDDI (Universal Description, Discovery and Integration) is a directory service where businesses can register and search for web services. UDDI is a public registry, where one can publish and inquire about web services.

Namespaces Within the.NET Framework, related classes are grouped into Namespaces. You need to insert a “using AppropriateNamespace” in your program. After that you can refer to methods and attributes of classes contained therein.

To get.Net namespace documentation Visit Msdn.microsoft.com/en- us/library/ms aspx

How do you write and run a program? Use visual studio to create a project. The project file will have the extension csproj. The project stores all related files, including the source file you write. Every project has a solution file with the extension sln. You would be opening this file when you want to return to your program you were writing. This will open all associated files. The associated files may be contained in a subdirectory. After writing the source code, go to build and build your solution, which creates the intermediate code. Go to debug and start without debugging. The program run will finish and give you a prompt to press any key to continue. Start with debugging, it will complete the run and return to you to the IDE. If your IDE does offer “without debugging”, add a console.readkey() statement.

Using the Form designer You can size the form by holding the handles in the corners or the middle. Controls and other items are added to the form using the toolbox. If control or item has properties that can be set. To write the code for an event, you can click on the view code button above the solution explorer or by simply clicking on a button or anything else on the form. Files with code you write will have extension.cs. Files ending with designer.cs are code files generated by visual studio.

Options for a new project Go to tools and choose options You may want to change the default project locations Look the Project properties, go to project and choose properties. If you have multiple forms, you can choose which one you want to start with. If you want enter button to be accepted instead of clicking a mouse, go to the properties of the form and choose acceptButton.

Naming Controls and Boxes Use a convention you will remember. I start all button names with btn. For example an accept button will be named btnAccept. An exit button will be named btnExit. All text boxes will start with txt. For example, sales amount will be named txtSalesAmount. All labels with start with lbl. For example, lblEnterName. It is up to you to choose naming conventions you will recognize.

Your First Assignment Assignment #1 The purpose of this assignment is to practice reading and writing to console using C#. It is a simple assignment. Use the following program run to design and write your program. Please submit Program listing and a screen capture of the program run. Follow the textbook examples to add comments as documentation.

Make sure to include your name, assignment number, date due and date completed on each assignment you submit. Assignment should be submitted in a manila folder with your name and assignment number appearing on the tab.

Time for class I expect to hold the class for little over an hour each time. Remaining time should be spend with your assigned groups to discuss the project in class. Please do not exchange programs with each other, just ideas.