By Sam Nasr Nasr Information Systems May 14, 2013.

Slides:



Advertisements
Similar presentations
Introduction to.Net By Sam Nasr May 5,
Advertisements

Windows Workflow Foundation By Sam Nasr, MCAD October 23,
Try…Catch…Finally Blocks ( continued ) Generic catch clause –Omit argument list with the catch –Any exception thrown is handled by executing code within.
Chapter 11 Debugging and Handling Exceptions
Introduction to Programming Lesson 1. Objectives Skills/ConceptsMTA Exam Objectives Understanding Computer Programming Understand computer storage and.
Microsoft VB 2005: Reloaded, Advanced Chapter 5 Input Validation, Error Handling, and Exception Handling.
1 Chapter 4 Language Fundamentals. 2 Identifiers Program parts such as packages, classes, and class members have names, which are formally known as identifiers.
Exception Handling An Exception is an indication of a problem that occurs during a program’s execution. Exception handling enables the programmer to create.
ASP.NET Programming with C# and SQL Server First Edition Chapter 8 Manipulating SQL Server Databases with ASP.NET.
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.
Rajeswari Indupuri Introduction to.NET Framework.
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.
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 Introduction to.NET Framework. 2.NETFramework Internet COM+ Orchestration Orchestration Windows.NET Enterprise ServersBuildingBlockServices Visual Studio.NET.
Understanding Events and Exceptions Lesson 3. Objective Domain Matrix Skills/ConceptsMTA Exam Objectives Understand events and event handling Understand.
Eric Vogel Software Developer A.J. Boggs & Company.
Module 1: Introduction to C# Module 2: Variables and Data Types
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.
Introduction to .NET Rui Ye.
Creating and Running Your First C# Program Svetlin Nakov Telerik Corporation
ASP.NET  ASP.NET is a web development platform, which provides a programming model, a comprehensive software infrastructure and various services required.
CIS 199 Test 01 Review. Computer Hardware  Central Processing Unit (CPU)  Brains  Operations performed here  Main Memory (RAM)  Scratchpad  Work.
PROGRAMMING IN VISUAL BASIC.NET VISUAL BASIC BUILDING BLOCKS Bilal Munir Mughal 1 Chapter-5.
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.
AUC Technologies Projects Consulting, Development, Mentoring, and Training Company.NET Foundation Presented By : Qazi Muhammad Arfeen Senior Software Engineer.
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.
VB.Net - Exceptions Copyright © Martin Schray
Introduction to .NET Framework
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.
Introduction to Exception Handling and Defensive Programming.
Applied Computing Technology Laboratory QuickStart C# Learning to Program in C# Amy Roberge & John Linehan November 7, 2005.
Rajiv and Shipra Introduction to.NET (asp.net,c#,vb)
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.
Intro to dot Net Dr. John Abraham UTPA CSCI 3327.
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.
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.
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,
Text INTRODUCTION TO ASP.NET. InterComm Campaign Guidelines CONFIDENTIAL Simply Server side language Simplified page development model Modular, well-factored,
Exception Handling How to handle the runtime errors.
Microsoft Visual Basic 2015 CHAPTER ONE Introduction to Visual Basic 2015 Programming.
14 New T-SQL Functions By Sam Nasr, MCAD, MCT, MCTS NIS August 18, 2012.
14 New T-SQL Functions By Sam Nasr, MCAD, MCTS. MVP Nasr Information Systems February 8, 2014.
Introduction to Programming Lesson 1. Algorithms Algorithm refers to a method for solving problems. Common techniques for representing an algorithms:
Generics, Exception and Undo Command. A Generic Stack Class AStack uses generic. In the main method, we have 2 instances of AStack, each type is Integer.
.Net Online Training. Introduction to.Net Microsoft.NET is a software Framework includes Framework class library and provides language interoperability.
D OTNET ONLINE TRAINING. DOTNET Online Training Course Content : Introduction to.Net Online Training NET FUNDAMENTALS Why Dot Net? The Dot Net initiative.
IS 350 Course Introduction. Slide 2 Objectives Identify the steps performed in the software development life cycle Describe selected tools used to design.
Introducing the Microsoft® .NET Framework
Programming with FileStream Object
ASP.NET Programming with C# and SQL Server First Edition
Introduction to Visual Basic 2008 Programming
C# and the .NET Framework
Application Foundation
Module 0: Introduction Chapter 2: Getting Started
Module 1: Getting Started
Introduction to Programming
Debugging and Handling Exceptions
Presentation transcript:

By Sam Nasr Nasr Information Systems May 14, 2013

Agenda Introduction What is.Net?.Net Framework Advantages of.Net/CLR Visual Studio C# Syntax

Introduction Sam Nasr, MCAD, MCTS, MCT Software Developer since 1995 Nasr Information Systems President Cleveland C#/VB.Net User Group President Cleveland WPF User Group President.Net Study Group INETA Mentor – Ohio Author - Visual Studio Magazine

What is.Net? New programming methodology Multiple Languages (VB.Net, C#, J#, etc.) IL JIT Compiler Primary Parts: 1..Net Framework 2. Common Language Runtime (CLR) - JIT Compiler RTM: v4.5, since 2000

.Net Framework A set of approximately 3500 classes. Classes are divided into namespaces grouping similar classes. For organization, each class belongs to only one namespace. Most classes are lumped into a name space called System System.Data: DB access System.XML: reading/writing XML System.Windows.Forms: Forms manipulation System.Net: network communication.

.Net Framework Supports Web Standards HTML XML XSLT SOAP WSDL (Web Services) ADO.Net: ActiveX Data Objects, EF ASP.Net: Active Server Pages Command Line Tools: ILDASM, ILASM, SN, etc.

Advantages of.Net Write once, run everywhere with.Net FW Multiple programming languages (20+) Coding Reduction Controls Template projects IIS/Cassini support Ease of Deployment Security Features

Visual Studio IDE for development Templates for: Console app, Web Service, Win Service, ASP.Net, Class Libraries Security tools VS Web Server (Cassini) Application Testing Team Suite for project management Express versions (free)

The C# Programming Language Microsoft proprietary language OO Language High-level Language Programs must be compiled before executed. Case sensitive Part of the.NET Framework, used for: ASP.Net Console Apps WF WCF WPF MVC

Elements of a C# Program Data TypesTypes of data in a program. Common data types are int (integers), char (single character value), float (floating point values). VariablesProvides temporary storage during program execution. int number = 10; ConstantsData fields whose value cannot be modified. const int i = 10; ArraysA collection of items in which each item can be accessed by a unique index. int[] numbers = { 1, 2, 3, 4, 5 }; OperatorsSymbols that specify which operation to perform on operands before returning a result. MethodsMethods are code blocks containing a series of statements. Methods can receive input via arguments and can return a value to the caller.

Structure of a C# Program

The if-else Statement The if-else statement allows your program to perform one action if the Boolean expression evaluates to true and a different action if the Boolean expression evaluates to false.

Demo

Exception Handling An exception is an unexpected error condition that occurs during program execution. When exception occurs, the runtime creates an exception object and “throws” it. Unless you “catch” the exception, the program execution will terminate. Exceptions are an object of the System.Exception class or one of its derived classes. Example: DivideByZeroException exception object is thrown when the program attempts to divide by zero. Example: FileNotFoundException exception object is throws when the program cannot find a given file.

Unhandled Exceptions What happens when the file c:\data.txt is not found in this code?

Handling Exceptions Place the code that throws the exceptions inside a try block. Place the code that handles an exception inside a catch block. You can have more than one catch blocks for each try block. Each catch block handles a specific exception type. A try block must have at least a catch block or a finally block associated with it.

Exception Handling Sample

The finally Block The finally block is used in association with the try block. The finally block is always executed regardless of whether an exception is thrown. The finally block is often used to write clean-up code.

try-catch-finally Example

Resources C# Jumpstart Training: courses/developer-training-with-programming-in-c courses/developer-training-with-programming-in-c Community Megaphone: C#/VB.Net Special Interest Group: Cleveland WPF User Group: Study Group:

Contact Info Thank you for attending!